digitalmars.D.bugs - private members through mixins broken
- Mike Parker (21/21) Apr 24 2005 ******************************
- Thomas Kuehne (11/32) Apr 26 2005 -----BEGIN PGP SIGNED MESSAGE-----
****************************** module mymodule; template foo() { private int x; } class MyClass { mixin foo; } void main() { MyClass c; c.x = 1; } ****************************** Compilation results in the following error: class mymodule.MyClass.foo!() foo_.x is private Shouldn't x still be accessible within the same module just as normal private members? The same error is produced with structs as well. dmd 0.121
Apr 24 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Parker schrieb am Mon, 25 Apr 2005 15:04:59 +0900:****************************** module mymodule; template foo() { private int x; } class MyClass { mixin foo; } void main() { MyClass c; c.x = 1; } ****************************** Compilation results in the following error: class mymodule.MyClass.foo!() foo_.x is private Shouldn't x still be accessible within the same module just as normal private members? The same error is produced with structs as well. dmd 0.121Added to DStress as http://dstress.kuehne.cn/run/private_07.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbykO3w+/yD4P9tIRAtHOAJ4hi5ZL/ryj+53p+jqd0M1M/HpHqACgli0l XiIW3jlqjB9H25tZqIGVX3w= =BGE0 -----END PGP SIGNATURE-----
Apr 26 2005