template setup(string s){
void dosomething(){
mixin(s);
}
}
void main(){
int s;
mixin setup!"s=1;";
dosomething;
s.writeln;
}
>mix(2): Error: cannot modify string literal `"s=1;"`
Should read "cant modify string literal "s"", "s=1" is not being modified and with the original code was completely unrelated
Comment #1 by robert.schadek — 2024-12-13T19:15:58Z