[Issue 17619] [REG2.072] Wrong debug line information with single line loops

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 8 03:30:32 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17619

--- Comment #2 from Martin Krejcirik <mk at krej.cz> ---
(In reply to Rainer Schuetze from comment #1)
> 1. the line number attached to the end of the for statement is the line of
> the token following the loop, while it should be the line after the last
> token of the statement. That would not really help if the declaration of
> "bad" would not be separated by an empty line, though.

I wonder if it could just stay in the loop body if there is no closing curly
bracket. However, if I add curly brackets to the single body line, it shows
foreach line on every iteration, so for consistency, it should be the same
without curlys;


>      When breaking inside test2, the call stack will look like it is being
> called by test1();

I don't observe such behaviour with an older dmd.

--


More information about the Digitalmars-d-bugs mailing list