The continue statement will update nactvarbeforecontinue. This can happen in a nested scope with more active variables then the ones that will be visible in the until part, resurrecting previous dead variables and allowing to read uninitialized variables.
function read_uninit()
local val
repeat
if val then
local x, y, z
continue
end
until (function() val=z return 1 end)()
return val
end
do
local x, y
for k in pairs({}) do end
end
print(read_uninit())
The
continue
statement will updatenactvarbeforecontinue
. This can happen in a nested scope with more active variables then the ones that will be visible in theuntil
part, resurrecting previous dead variables and allowing to read uninitialized variables.