digitalmars.D.bugs - access to private members of nested classes
- Thomas Kuehne (24/24) Apr 06 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Ant (4/22) Apr 06 2005 It should NOT compile.
- Thomas Kuehne (19/47) Apr 06 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Ant (5/47) Apr 06 2005 !!!!
- Stewart Gordon (10/24) Apr 06 2005 Any particular reason you don't like this feature?
- Ant (6/26) Apr 06 2005 You're right. I forget that.
- Stewart Gordon (9/30) Apr 06 2005 Yes. Moreover, it's a prime example of the usefulness of private stuff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd-0.119: class A.B member c is not accessible http://digitalmars.com/d/attribute.html Am I missing something or should the code above compile? Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCU8iK3w+/yD4P9tIRAl9yAJ9bEoCFq4aoxBYK9HNyt15RGPLyngCdE2eI g2I9l9OaFBbNL0Cj9JFl2nQ= =TWeR -----END PGP SIGNATURE-----
Apr 06 2005
In article <attci2-qul.ln1 lnews.kuehne.cn>, Thomas Kuehne says...-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd-0.119: class A.B member c is not accessible http://digitalmars.com/d/attribute.html Am I missing something or should the code above compile?It should NOT compile. "the enclosing" class means B. Ant
Apr 06 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ant schrieb am Wed, 6 Apr 2005 14:30:43 +0000 (UTC):In article <attci2-qul.ln1 lnews.kuehne.cn>, Thomas Kuehne says..."or members and functions in the same module" A and B are in the same module. the code below compiles Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCU/VL3w+/yD4P9tIRAn1VAJ9Tl6hrd3NrEr8htKS8H6lxedQdfwCfXoX2 VravBqz8tkgn3D+tm0chWAs= =MDkD -----END PGP SIGNATURE----------BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd-0.119: class A.B member c is not accessible http://digitalmars.com/d/attribute.html Am I missing something or should the code above compile?It should NOT compile. "the enclosing" class means B.
Apr 06 2005
In article <b39di2-bk6.ln1 lnews.kuehne.cn>, Thomas Kuehne says...-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ant schrieb am Wed, 6 Apr 2005 14:30:43 +0000 (UTC):!!!! it's a pitty, it shouldn't. and change the docs. oh well... AntIn article <attci2-qul.ln1 lnews.kuehne.cn>, Thomas Kuehne says..."or members and functions in the same module" A and B are in the same module. the code below compiles-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd-0.119: class A.B member c is not accessible http://digitalmars.com/d/attribute.html Am I missing something or should the code above compile?It should NOT compile. "the enclosing" class means B.
Apr 06 2005
Ant wrote:In article <b39di2-bk6.ln1 lnews.kuehne.cn>, Thomas Kuehne says...<snip>Any particular reason you don't like this feature? And if we broke plenty of existing code by changing it, how would you suggest rewriting this? http://www.digitalmars.com/d/cpptod.html#friends Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.the code below compiles!!!! it's a pitty, it shouldn't. and change the docs. oh well...
Apr 06 2005
In article <d311bt$2fdj$1 digitaldaemon.com>, Stewart Gordon says...Ant wrote:You're right. I forget that. Somebody explain it to me on these groups but obviously my understanding is only supperficial, and I don't use it at all. My limitation, sorry. AntIn article <b39di2-bk6.ln1 lnews.kuehne.cn>, Thomas Kuehne says...<snip>Any particular reason you don't like this feature? And if we broke plenty of existing code by changing it, how would you suggest rewriting this? http://www.digitalmars.com/d/cpptod.html#friendsthe code below compiles!!!! it's a pitty, it shouldn't. and change the docs. oh well...
Apr 06 2005
Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd-0.119: class A.B member c is not accessibleI thought this bug had been fixed, but apparently not.http://digitalmars.com/d/attribute.html Am I missing something or should the code above compile?Yes. Moreover, it's a prime example of the usefulness of private stuff being accessible to the module. It's just a slightly cut-down version of private_02 in DStress. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Apr 06 2005