digitalmars.D - struct access specifiers
- imr1984 (3/3) Apr 15 2005 private/public work inside a struct, but they have no effect on the acce...
- Carlos Santander B. (23/29) Apr 15 2005 Confirmed. (cross-posted to bugs ng)
private/public work inside a struct, but they have no effect on the access level of the structs members (private/public are not implemented in structs). Could access specifiers be implemented for structs? This would be great.
Apr 15 2005
imr1984 wrote:private/public work inside a struct, but they have no effect on the access level of the structs members (private/public are not implemented in structs). Could access specifiers be implemented for structs? This would be great.Confirmed. (cross-posted to bugs ng) //---------------------------------- // file a.d struct A { public int x; private char y; } //---------------------------------- // file b.d import a; void main() { A a; a.x=1; a.y='a'; } //---------------------------------- Compiles and runs when it shouldn't. -- Carlos Santander Bernal JP2, you'll always live in our minds
Apr 15 2005