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
Currently, multiple "overloaded" annotations for the same function seem to always be combined into one union, instead of selecting the overload based on the actual, known argument values. For example:
The different values for the event_name parameter could be used to deduce the callback type, and therefore the type of the evt parameter. For example when used like this, the type of evt should be known to be event_b:
register_callback("a", function(evt)
print(evt.prop_a) -- validprint(evt.prop_b) -- not valid (Undefined field)end)
The text was updated successfully, but these errors were encountered:
There are a bunch of issues referencing this. I think the title of this issue best suits the issue. However, the use case in this issue is almost the exact same as in #1456, which discusses changing the way things are overloaded.
Currently, multiple "overloaded" annotations for the same function seem to always be combined into one union, instead of selecting the overload based on the actual, known argument values. For example:
The different values for the
event_name
parameter could be used to deduce the callback type, and therefore the type of theevt
parameter. For example when used like this, the type ofevt
should be known to be event_b:The text was updated successfully, but these errors were encountered: