Template mixin scope seems to have a weird behavior:I don't understand 'WEIRD(1)' and 'WEIRD(2)' below.import std.stdio;struct A{int b;this(int b){this.b=b;writeln("A.begin");}~this(){writeln("A.end");}}mixin template Entry(){auto a=A(12);}void test1(){writeln("test.begin");mixin Entry;writeln(a.b);//WEIRD! destructor has been called but a.b is still alivewriteln("test.end");}void test2(){writeln("test.begin");auto a=A(0);writeln("test.end");}void test3(){writeln("test.begin");mixin("auto a=A(0);");writeln("test.end");}void main(){test1;writeln;test2;writeln;test3;}output:----------------test.beginA.beginA.end //WEIRD(1): why is destructor called before test.end?12 //WEIRD(2): destructor has been called but a.b is still alivetest.endtest.beginA.begintest.endA.endtest.beginA.begintest.endA.end----------------