Closed Calandiel closed 2 years ago
Ah, good catch! I think the way to go to fix this is to disallow creating a global in a scope where there is already a local with the same name, thus guaranteeing that valid Teal code matches the Lua semantics for that.
The above translates to this:
I think taking teal code at a glance, you'd expect the print to output 1, but the lua version will of course output nil instead.