[Issue 661] New: Error using a zero-init struct's init property
Thomas Kuehne
thomas-dloop at kuehne.cn
Thu Dec 7 03:00:18 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-12-07:
> http://d.puremagic.com/issues/show_bug.cgi?id=661
> ---
> struct X { int x; }
> void main()
> {
> X x;
> x = x.init;
> }
> ---
> Compiling yields: Error: cannot implicitly convert expression (0) of type int
> to X
Added to DStress as
http://dstress.kuehne.cn/run/s/struct_initialization_08_A.d
http://dstress.kuehne.cn/run/s/struct_initialization_08_B.d
http://dstress.kuehne.cn/run/s/struct_initialization_08_C.d
http://dstress.kuehne.cn/run/s/struct_initialization_08_D.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFd/p2LK5blCcjpWoRAoPmAJ0WkQjHD+t0Mlw89L99In5p9FEYbACfQ6BC
ajDLqvHiKnSk31FKpg55UdM=
=26Hd
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list