lua-users home
lua-l archive

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


> On Nov 15, 2018, at 3:22 PM, Gabriel Bertilson <arboreous.philologist@gmail.com> wrote:
> 
> So the function expression
> `function () return x end` either returns an upvalue or a global, and
> the assignment `x = 10` is resolved to an assignment

Actually it doesn’t return an upvalue OR a global .. it returns whatever value was in ‘x’ when the function was called.

—Tim