lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> This code however (just one line commented out) compiles with the error below:
> 
> built_ins = {__index = M}
> setmetatable(built_ins, built_ins)
> 
> -- z = function() end
> 
> (setfenv(function() end, built_ins))()    -- <----- line 78

The compiler sees this:
  setmetatable(built_ins, built_ins)(setfenv(function() end, built_ins))()