[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [BUG]Wrong trace of goto
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 23 Oct 2020 13:50:35 -0300
> > debug.sethook(function(...) print(...) end, "l")
> > if false then
> > goto EXIT
> > A = 1
> > end
> > ::EXIT::
>
> The output is:
> line 3
> line 6
>
> I think it should be
> line 2
> line 6
This is not a bug. It's a consequence of an optimization introduced by
the compiler. Replace false by foo and see the difference.