August 30, 2005 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; } |
Copyright © 1999-2021 by the D Language Foundation