You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Luau currently reports a type error in strict mode for code generated for the client.
This is due to when using :WaitForChild, the return value is Instance while we know that it's a RemoteEvent.
The function FireServer does not exist on type Instance thus correctly reporting an error.
Reproduction
Just generate any code for the client. It should cause a type error in strict mode.
Expected behavior
The generated code should not give off any type error.
Potential Fix
Typecast the resulting return value to be RemoteEvent / UnreliableRemoteEvent
The text was updated successfully, but these errors were encountered:
I believe a better fix to this problem is to just assert the class of the instance received, because the instance received could actually be something other than a RemoteEvent. That looks like
Describe the bug
Luau currently reports a type error in strict mode for code generated for the client.
This is due to when using
:WaitForChild
, the return value isInstance
while we know that it's a RemoteEvent.The function
FireServer
does not exist on typeInstance
thus correctly reporting an error.Reproduction
Just generate any code for the client. It should cause a type error in strict mode.
Expected behavior
The generated code should not give off any type error.
Potential Fix
Typecast the resulting return value to be RemoteEvent / UnreliableRemoteEvent
The text was updated successfully, but these errors were encountered: