function foo1(bar: number?)
if not bar then
return
end
bar += 3
end
function foo2(bar: number?)
for i=1,3 do
if not bar then
continue
end
bar += 3
end
end
function foo3(bar: Instance)
for i=1,3 do
if not bar:IsA("Model") then
continue
end
bar.PrimaryPart = nil
end
end
My examples are quite week, but there are numerous situations where this occurs. Current workaround is a cast or assert.
Expected behavior
Should pickup that the type in that branch of the code is different.