Instead of mixing in the scope guard the line within the gaurd is executed.
import std.stdio;
int main(char[][] args) {
dummy();
return 0;
}
void dummy() {
mixin("scope(exit){writefln(\"should be last\");}"); //printed first
writefln("should be first"); //printed last
}
Comment #1 by tomas — 2007-05-09T07:03:12Z
*** This bug has been marked as a duplicate of 1025 ***