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: [email protected]
          Reporter: [email protected]

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
---

--

Reply via email to