Using either Non-Strict or Strict Typechecking, the Typechecker will falsely warn about nill-able variables when using guard-clauses.
Repro
--!nonstrict
local Baseplate: Part? = workspace.Baseplate
function foo()
if Baseplate then
Baseplate.Anchored = false -- Okay
end
if not Baseplate then return end
Baseplate.Anchored = false -- Value of 'Part?' could be nil
end
Expected Behavior
Since Guard-Clauses are a common code pattern, I expect the Typechecker to respect nill-ables when they are applied.