Bug again?

Zhouxuan pycerl at qq.com
Thu Oct 3 05:24:37 PDT 2013


mixin template test()
{
	int next;
}

void foo(alias l, alias t)()
{
	t.next = l.next;
}

void main()
{
	struct A
	{
		int next;
	}
	
	A a;

	mixin test l1;
	mixin test l2;
	
	foo!(l1,a);     //ok!
	foo!(l1,l2);    //compilation error!
}



More information about the Digitalmars-d-learn mailing list