digitalmars.D.bugs - Weird static assert behavior
- tetsuya (10/10) Sep 01 2005 The static assert does inconsistent behavior on dmd0.129, winXP.
- =?UTF-8?B?VGhvbWFzIEvDvGhuZQ==?= (14/24) Sep 07 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Walter Bright (1/1) Sep 10 2005 That's the old const folding problem. It's fixed.
The static assert does inconsistent behavior on dmd0.129, winXP. <code> class XXX(int L) { static assert(L > 0); // passes on compilation (should fail static this() { assert(L > 0); } // fails on execution } void main() { alias XXX!(-1) xxx; } </code> cheers,
Sep 01 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 tetsuya schrieb:The static assert does inconsistent behavior on dmd0.129, winXP. <code> class XXX(int L) { static assert(L > 0); // passes on compilation (should fail static this() { assert(L > 0); } // fails on execution } void main() { alias XXX!(-1) xxx; } </code>Added to DStress as http://dstress.kuehne.cn/nocompile/a/assert_11_A.d http://dstress.kuehne.cn/nocompile/a/assert_11_B.d http://dstress.kuehne.cn/nocompile/a/assert_11_C.d http://dstress.kuehne.cn/nocompile/a/assert_11_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDH2W43w+/yD4P9tIRAqIeAJ9iNcW5uRmjPb9o3HMjSiuTvVxpnQCgre9k nk3TxfM+gEO6pVKXRfSXwCY= =xEFM -----END PGP SIGNATURE-----
Sep 07 2005
That's the old const folding problem. It's fixed.
Sep 10 2005