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.
Comment #1 by razvan.nitu1305 — 2018-08-22T15:50:38Z