mixin template scope inconsistency?

2015-03-03 Thread Timothee Cour via Digitalmars-d-learn
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(){

Re: mixin template scope inconsistency?

2015-03-03 Thread Timothee Cour via Digitalmars-d-learn
posted as bugzilla/14243. Am I misunderstanding something here? On Tue, Mar 3, 2015 at 10:20 PM, Timothee Cour thelastmamm...@gmail.com wrote: 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;