lua-users home
lua-l archive

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


On Fri, Oct 2, 2015 at 3:25 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2015-10-02 20:54 GMT+02:00 Parke <parke.nexus@gmail.com>:
>
>> Egor's original suggestion was that a warning be added to the REPL to
>> alert new users of the schism.  A REPL warning in response to
>> singleton statements of the form "local namelist [‘=’ explist]" seems
>> like a good idea to me.
>
> The difficulty is that this is not a simple matter of changing
> a few lines in lua.c. One needs functionality equivalent to
> luac to diagnose the situation.

It's simpler than that. You can use lua_getlocal to determine if the
chunk defined any locals.

-- 
Patrick Donnelly