digitalmars.D.bugs - [Issue 13031] New: `continue` with label causes compiler to think
- via Digitalmars-d-bugs (31/31) Jul 03 2014 https://issues.dlang.org/show_bug.cgi?id=13031
https://issues.dlang.org/show_bug.cgi?id=13031 Issue ID: 13031 Summary: `continue` with label causes compiler to think code after loop can be executed Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: verylonglogin.reg gmail.com This code should compile: --- int f(int a) { L: for(;;) { if(a--) continue L; return 0; } } --- main.d(1): Error: function main.f no return exp; or assert(0); at end of function --- --
Jul 03 2014