www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Private template class members 'not accessible' in same file.

reply Dave <Dave_member pathlink.com> writes:
test.d(18): class test.CT!(int).CT member i is not accessible

;---
class C
{
private:
int i;
}

class CT(T)
{
private:
T i;
}

void main()
{
C c = new C();
c.i = 10;
CT!(int) ct = new CT!(int);
ct.i = 10;
}
;---
Aug 04 2005
parent =?UTF-8?B?VGhvbWFzIEvDvGhuZQ==?= writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave schrieb:

 test.d(18): class test.CT!(int).CT member i is not accessible
 
 ;---
 class C
 {
 private:
 int i;
 }
 
 class CT(T)
 {
 private:
 T i;
 }
 
 void main()
 {
 C c = new C();
 c.i = 10;
 CT!(int) ct = new CT!(int);
 ct.i = 10;
 }
 ;---

Known bug: http://dstress.kuehne.cn/run/private_04.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFC9LkO3w+/yD4P9tIRAuVpAJ0Q0BH3UaUYeYEavxqyQTA08TnYTQCgjYUs +sA68np89S5kyko+zOLqMCE= =ZFz9 -----END PGP SIGNATURE-----
Aug 06 2005