consider void main(){ int x; switch(x){ case 0: auto e=1; break; case 1: auto e=2; break; // fine default: auto e=3; break; // fine } switch(x){ case 0: auto e=1; break; mixin("case 1:"); auto e=2; break; //error mixin("default:"); auto e=3; break;// error } } tested with DMD 2.054
This bug is still present in DMD 2.073.1
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18367 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB