https://issues.dlang.org/show_bug.cgi?id=17619
Rainer Schuetze <r.sagita...@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagita...@gmx.de --- Comment #1 from Rainer Schuetze <r.sagita...@gmx.de> --- I think there are (at least) two issues here: 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. 2. there is no perfect fit for the line number attached to the loop iteration and jump back to the start: - if it is after the loop, it looks as if the loop has already terminated (as reported here). This also happens sometimes for C++ code with VC (not sure about gcc). - if it is on the loop statement the call stack of a function call inside the loop can get confusing, e.g. void main() { test1(); foreach (i; 0 .. 3) test2(); } When breaking inside test2, the call stack will look like it is being called by test1(); --