digitalmars.D.bugs - non-static nested class round up
- Thomas Kuehne (39/39) Oct 28 2005 -----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Deewiant (news:dionmt$afm$1 digitaldaemon.com) and Dennis Luehring (news:djo1km$280i$1 digitaldaemon.com) pointed out some gaps in the documentation of nested classes. http://digitalmars.com/d/class.html#nested class Outer{ class Inner{ void foo(){ Inner i = new Inner; } } } void bar(){ Outer o = new Outer; Outer.Inner i = new o.Inner; } In both cases the context pointer information seems to be present but unused by DMD-0.137. The samples on the documentation page don't classify the foo and bar cases as "Ok" or "Error". In addition the documentation doesn't explicitly state how the necessary context pointer information has to be provided. I've added both cases to DStress as http://dstress.kuehne.cn/undefined/class_19_A.d http://dstress.kuehne.cn/undefined/class_19_B.d but I think, it's sensible and in line with other languages like Java to legalize both situations. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDYhuv3w+/yD4P9tIRAmpIAKDDl3Ypq3M5yevjQzx6nLoeCLbqrwCfYY/V I02QZ34z+RnqeK9jxQZhM0U= =KYj/ -----END PGP SIGNATURE-----
Oct 28 2005