D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16971 - Misleading error messages "break is not inside scope(exit) bodies" "continue is not inside scope(exit) bodies"
Summary: Misleading error messages "break is not inside scope(exit) bodies" "continue ...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P5 trivial
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2016-12-14 23:42 UTC by Ali Cehreli
Modified: 2020-05-09 14:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ali Cehreli 2016-12-14 23:42:07 UTC
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
Comment 1 Dlang Bot 2020-05-09 12:58:32 UTC
@Luhrel created dlang/dmd pull request #11121 "Fix issue 16971 - Misleading error messages..." fixing this issue:

- Fix issue 16971 - Misleading error messages...

https://github.com/dlang/dmd/pull/11121
Comment 2 Dlang Bot 2020-05-09 14:34:53 UTC
dlang/dmd pull request #11121 "Fix issue 16971 - Misleading error messages..." was merged into master:

- 6415f659a0d5edea7e2c9a40d5abf49c7bc30135 by Luhrel:
  Fix issue 16971 - Misleading error messages...

https://github.com/dlang/dmd/pull/11121