[Issue 19182] New: missing semicolon crashes compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 20 12:41:33 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19182
Issue ID: 19182
Summary: missing semicolon crashes compiler
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: ice
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
void foo() {
pragma(msg, "") // Here
static foreach (e; [1]) {
pragma(msg, "");
}
}
Removing the surrounding function scope causes an error message:
foo.d(1): Error: pragma `msg` is missing a terminating ;
If the array is empty, it compiles without error (accepts-invalid).
If there's no pragma(msg) inside the static foreach, it compiles without error.
If I use (non-static) tuple foreach, it compiles without error.
--
More information about the Digitalmars-d-bugs
mailing list