Closed upvalues not supported =(
mpeterv opened this issue · 2 comments
mpeterv commented
local u = "Hello"
local function f()
local w = "World"
return function()
print(u .. " " .. w)
print(F"{u} {w}")
end
end
f()()
Hello World
Hello nil
mpeterv commented
If w
is not used in the inner function then its value dies after f
returns, otherwise debug.getupvalue
should help.
hishamhm commented
This example now works, thank you!