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
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
On 10 July 2018 at 18:34, Roberto Ierusalimschy <[hidden email]> wrote:
>> local b = true
>> if not b then
>> error 'test'
>> The line number in the error message is 5, but it should be 7.
> How did you find this bug?