www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Mixin access within a class bug

Using a mixin as private method to a class makes it inaccessible to
anything else within the class.

test.d(8): class test.Foo test.Foo.Mixfunc!() Mixfunc_.func is private


template Mixfunc()
{
     void func(){}
}

class Foo
{
private:
     mixin Mixfunc;

     void somefunc(){func();}
public:
     this(){somefunc();}
     ~this(){}
}

int main()
{
     Foo t=new Foo;
     return 1;
}
Aug 30 2005