Template mixin can not introduce overloads

Tofu Ninja via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 24 20:49:03 PDT 2015


Is this intended or is it a bug?

void main(string[] args)
{
	Test a;
	a.foo(5); // Fails to compile
}

struct Test
{
	mixin testMix;
	void foo(string y){}
}

mixin template testMix()
{
	void foo(int x){}
}


More information about the Digitalmars-d-learn mailing list