Thread overview | |||||
---|---|---|---|---|---|
|
September 02, 2005 Weird static assert behavior | ||||
---|---|---|---|---|
| ||||
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, |
September 07, 2005 Re: Weird static assert behavior | ||||
---|---|---|---|---|
| ||||
Posted in reply to tetsuya Attachments: | 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 |
Copyright © 1999-2021 by the D Language Foundation