[Issue 720] New: bug in array literal parsing with append

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Dec 26 04:16:14 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-12-22:
> http://d.puremagic.com/issues/show_bug.cgi?id=720

> The following code causes an assert in dmd -- it seems to have to do with
> deducing the type of an array literal.  If I assign the array literal to
> a variable, then append that to the array, it works.
>
> The error:
>
> dmd -ofmini mini.d
> Internal error: ../ztc/cod1.c 2526 
>
> The code:
>
> -----
> void foo()
> {
>     int[2][] pos;
>     pos ~= [1, 2];
> }
>
> int main(char[][] a)
> {
>     foo();
>     return 0;
> }
> -----

Added to DStress as
http://dstress.kuehne.cn/run/o/opCatAssign_20_A.d
http://dstress.kuehne.cn/run/o/opCatAssign_20_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFkRKJLK5blCcjpWoRAuHpAJsGPV16dUaya0KR8bOFGSlmAzU2CACgmvpx
kKxDyMCl6dr6DyXguyCb7fg=
=wdM5
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-bugs mailing list