digitalmars.D.bugs - mixin and const initializer
-
Ilya Zaitseff
(18/18)
Feb 22 2005
- =?UTF-8?B?VGhvbWFzIEvDvGhuZQ==?= (35/35) Mar 11 2005 -----BEGIN PGP SIGNED MESSAGE-----
<code> template T() { int x; } struct S { mixin T; } void main() { const S s = { x:0 }; } </code> When compiling, DMD 0.113 outputs: Error: 'x' is not a member of 'S' But if remove 'mixin T' line, and insert instead 'int x', program compiles successfully.
Feb 22 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ilya Zaitseff wrote: | <code> | template T() | { | int x; | } | | struct S | { | mixin T; | } | | void main() | { | const S s = { x:0 }; | } | </code> | | When compiling, DMD 0.113 outputs: | Error: 'x' is not a member of 'S' | | But if remove 'mixin T' line, and insert instead 'int x', program | compiles successfully. Added to DStress as http://dstress.kuehne.cn/run/mixin_05.d http://dstress.kuehne.cn/run/mixin_06.d Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) iD8DBQFCMicy3w+/yD4P9tIRAu1iAJwLviiEvUfk1oufKbR8NRCD4GEfJwCdGnbQ jN5ISBTgjFLfXfrkI5l1xjg= =6Dus -----END PGP SIGNATURE-----
Mar 11 2005