digitalmars.D.bugs - typedef-ed class field
- Mizuno Hiroki (14/14) May 16 2005 I cannot access typedef-ed class field.
- David Medlock (4/21) May 16 2005 Use
- Mizuno Hiroki (11/37) May 16 2005 If I use "alias",I cannot override like this.
- Thomas Kuehne (19/31) May 17 2005 -----BEGIN PGP SIGNED MESSAGE-----
I cannot access typedef-ed class field. ------------------------------------------------- class Foo{ int i; } typedef Foo Bar; void main(){ Bar bar = new Bar; int n = bar.i; // this for i needs to be type // Foo not type Bar } ------------------------------------------------- -- Mizuno Hiroki
May 16 2005
Mizuno Hiroki wrote:I cannot access typedef-ed class field. ------------------------------------------------- class Foo{ int i; } typedef Foo Bar; void main(){ Bar bar = new Bar; int n = bar.i; // this for i needs to be type // Foo not type Bar } ------------------------------------------------- -- Mizuno HirokiUse alias Foo Bar; -DavidM
May 16 2005
David Medlock wrote:Mizuno Hiroki wrote:If I use "alias",I cannot override like this. ------------------------------------------------- class Foo{ ... } typedef Foo Bar1; typedef Foo Bar2; void f(Bar1 bar){...} void f(Bar2 bar){...} ------------------------------------------------- -- Mizuno HirokiI cannot access typedef-ed class field. ------------------------------------------------- class Foo{ int i; } typedef Foo Bar; void main(){ Bar bar = new Bar; int n = bar.i; // this for i needs to be type // Foo not type Bar } ------------------------------------------------- -- Mizuno HirokiUse alias Foo Bar; -DavidM
May 16 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mizuno Hiroki schrieb am Mon, 16 May 2005 23:50:46 +0900:I cannot access typedef-ed class field. ------------------------------------------------- class Foo{ int i; } typedef Foo Bar; void main(){ Bar bar = new Bar; int n = bar.i; // this for i needs to be type // Foo not type Bar } -------------------------------------------------Added to DStress as http://dstress.kuehne.cn/run/t/typedef_06_A.d http://dstress.kuehne.cn/run/t/typedef_06_B.d http://dstress.kuehne.cn/run/t/typedef_06_C.d http://dstress.kuehne.cn/run/t/typedef_07_A.d http://dstress.kuehne.cn/run/t/typedef_07_B.d http://dstress.kuehne.cn/run/t/typedef_07_C.d http://dstress.kuehne.cn/run/t/typedef_08_A.d http://dstress.kuehne.cn/run/t/typedef_08_B.d http://dstress.kuehne.cn/run/t/typedef_08_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCiipR3w+/yD4P9tIRApyQAJ9eRN/plePRvFYJkeWhd2nPGE4f1wCgzqlK Wqpu8M9NCZovmrXPHLcew2M= =iYXR -----END PGP SIGNATURE-----
May 17 2005