Bug 16971 – Misleading error messages "break is not inside scope(exit) bodies" "continue is not inside scope(exit) bodies"

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-12-14T23:42:07Z
Last change time
2020-05-09T14:34:53Z
Keywords
pull
Assigned to
No Owner
Creator
Ali Cehreli

Comments

Comment #0 by acehreli — 2016-12-14T23:42:07Z
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 by dlang-bot — 2020-05-09T12:58:32Z
@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 by dlang-bot — 2020-05-09T14:34:53Z
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