Sample (usable in luau-lsp, though a basic ClassType or other type w/ a function taking self could repro):
--!strict
local RunService = game:GetService("RunService")
-- is RunService, not RunService?
if RunService:IsRunning() then
local b = RunService
-- b is RunService? instead of RunService
end
print(RunService)
Sample (usable in luau-lsp, though a basic ClassType or other type w/ a function taking self could repro):
Unsure if related to https://github.com/luau-lang/luau/issues/1517 Arguments (including the RunService as self here) are appended to
returnRefinements
, which has optional appended by https://github.com/luau-lang/luau/blob/e905e305702388543dac9040667968c0b856506d/Analysis/src/ConstraintGenerator.cpp#L611