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

Reply via email to