[Issue 490] New: Static struct initializer without static attribute aborts dmd with assertion
Thomas Kuehne
thomas-dloop at kuehne.cn
Sat Dec 23 13:20:10 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-11-09:
> http://d.puremagic.com/issues/show_bug.cgi?id=490
> public struct S
> {
> int a, b;
> }
>
> void main() {
> S s= {1, 2}; // DMD fails to throw an error and aborts.
> S q= {a:1, b:2}; // Idem.
>
> static S r= {1, 2}; // OK.
> static S t= {a:1, b:2}; // OK.
> }
>
> DMD says:
> dmd: init.c:219: virtual Expression* StructInitializer::toExpression():
> Assertion `0' failed.
> Aborted
Added to DStress as
http://dstress.kuehne.cn/nocompile/s/struct_initialization_09_A.d
http://dstress.kuehne.cn/nocompile/s/struct_initialization_09_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFjYx3LK5blCcjpWoRAqAmAJ0dBBb8APyJZfUd1109oJGuBE9xxACfWHZU
xvG2TtwK8hnsnR8UHv6xn20=
=Jrdt
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list