lua-users home
lua-l archive

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


On 16 October 2012 15:05, David Collier <myshkin@cix.co.uk> wrote:
> Is there anything I can do to get the interpreter to issue a warning when
> I hide a variable?
>
> I almost never mean to do it and it's a real source of wasted time!

What do you mean by "hide a variable"? Do you mean shadowing, as in:

    local foo = 1
    -- code here
   local foo = "something else"

Perhaps? If this is the case, I highly recommend lua-inspect to catch
things like this, and more: https://github.com/davidm/lua-inspect

Regards,
Matthew