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

          Issue ID: 16971
           Summary: Misleading error messages "break is not inside
                    scope(exit) bodies" "continue is not inside
                    scope(exit) bodies"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: acehr...@yahoo.com

void main() {
    for (;;) {
        scope (exit) break;
        scope (exit) continue;
    }
}

  Error: break is not inside scope(exit) bodies
  Error: continue is not inside scope(exit) bodies

The error messages are missing something like "allowed" as in

   "... is not allowed inside ..."

Ali

--

Reply via email to