PlutoLang / Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.
https://pluto-lang.org/docs/Introduction
MIT License
337 stars 20 forks source link

Null coalesce leads to locals getting mixed up #873

Closed aaronlink127 closed 1 month ago

aaronlink127 commented 1 month ago
local y = nil
local x = y ?? 10
print(y)

the expected result would be nil, but it instead prints 10 despite that being the value of x

Sainan commented 1 month ago

Notably, this is not an issue on 0.9.2, but it is on main.