Type information for RBXScriptConnection in Typed Lua beta is wrong

With typed Lua beta turned on, putting this code into a script creates two script analysis errors:

local foo: RBXScriptConnection = game.Changed:Connect(function() end)
foo:Disconnect()

image
image

Removing the type annotation from foo causes the errors to stop, which is a quick fix for that particular problem, but a simple guard causes the errors to reappear:
image
image

This occurs in Studio version 0.443.0.409841.

2 Likes

Hi Dekkonot

Thanks for the report, we will take a look.

1 Like