PlutoLang / Pluto

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

Uninitialized variable read #801

Closed XmiliaH closed 5 months ago

XmiliaH commented 5 months ago

In case that the safe navigation method call needs to return a fixed number of return, the nil branch will not ensure that all results are nil but only the first.

do
    for k in pairs({}) do end
end

local x, y, z, w = _G:m?()

print(x, y, z, w)