hishamhm/f-strings

Closed upvalues not supported =(

mpeterv opened this issue · 2 comments

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

If w is not used in the inner function then its value dies after f returns, otherwise debug.getupvalue should help.

This example now works, thank you!