lua-users home
lua-l archive

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


> a, b = foo()
> setfenv(a, {x=2})
> b()
> 
> Does that print 1 or 2?

Neither: it gives an error: attempt to call global 'b' (a nil value).
If you make a,b local, then it does print 2.