This *is* a bug. Has it been reported yet? <code> import std.stdio; void main() { { scope(exit) writef("a\n"); } scope(exit) writef("b\n"); } <code> output: a b b