lua-users home
lua-l archive

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


I can also reproduce this if I put the error call inside an else
statement. For the following program Lua5.3 says the error is in line 6
but 5.4 says it is in line 4.

--------------
local b = true

if not b then
    return
else
    error 'test'
end
-------------

Interestingly, it seems that other small changes make this bug
disappear, and that the original example is already very minimal. I
can't reproduce the bug if I use a global "b = true" instead of "local
b = true". The bug is also not present if I use "local b = false"
combined with "if b", or if I switch the condition to "if false" or "if
not true".