Fix switch() not working in strict mode

Fixes #20
This commit is contained in:
Aaron Smith 2023-09-27 10:02:09 +01:00
parent fd2888afab
commit d07c705b64
3 changed files with 46 additions and 25 deletions

View file

@ -53,7 +53,7 @@ local function switch<T, U>(source: () -> T): (map: Map<T, ((() -> U)?)>) -> ()
return result
end
local node = create_node(nil :: any, update)
local node = create_node(nil :: U?, update)
set_owner(node, owner)
evaluate_node(node)