void main() { switch (0) { mixin ("case 0: break;"); default: assert (0); } } The above code fails to compile with repeated "found 'EOF' instead of statement" errors on the line of the mixin, as does the following: void main() { switch (0) { mixin ("default: break;"); } } Were they not mixins, the code would compile and run fine. Mixing in ordinary labelled statements works: void main() { goto x; assert (0); mixin("x:;"); } Workarounds: Mixing in the entire switch statement: void main() { mixin("switch (0) {" "case 0: break;" "default: assert (0);" "}"); } Or just the block statement inside the switch: void main() { switch (0) mixin("{" "case 0: break;" "default: assert (0);" "}"); }
*** This issue has been marked as a duplicate of issue 1534 ***