On 12.07.2011 15:06, Trass3r wrote:
Is this a bug? If not, how do you make it work?

void h() {}

class Bla
{
mixin wrap!h;
}

mixin template wrap(alias f)
{
void blub(alias g = f)()
{
}
}

void main()
{
Bla b = new Bla();
b.blub();
}

test.d(18): Error: template instance cannot use local 'f' as parameter
to non-global template blub(alias g = f)
test.d(18): Error: template instance forward reference of f
test.d(18): Error: template instance test.Bla.wrap!(h).blub!(f) error
instantiating

I am not sure but i am not that used to those template aliases anyway.

Reply via email to