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