Typed Lua beta doesn't like callbacks

In the typed Lua beta, when you try to write to a callback (as in RemoteFunctions), the editor complains because Cannot add property [name] to sealed table [class] where [name] and [class] are the property name and the ClassName respectively.

To replicate this, make a script and paste this into it.

--!strict
local foo = Instance.new("RemoteFunction")

foo.OnServerInvoke = function() end

It will create a warning in Script Analysis. The same effect can be observed for things like BindableEvent.OnInvoke and MarketplaceService.ProcessReceipt. In fact, every Callback I tested had this problem, leading me to believe they simply aren’t included in the type system.

This issue is present on studio version 0.442.3.409454.

7 Likes

Syntax sugar has this issue too:

I am using same version and on windows 10

Hi Dekkonot. Thanks for the report, we will take a look.

1 Like

I am in the process of checking over bug reports and following up on some bugs that haven’t received any activity in a while.
Is this issue still occurring or can you confirm that this bug has been resolved?

This issue should now be resolved! If this issue is still occurring, please create a new topic for us to look into.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.