[Issue 220] New: ICE with template and mangleof

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Jun 29 06:35:25 PDT 2006


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

d-bugmail at puremagic.com schrieb am 2006-06-23:
> http://d.puremagic.com/issues/show_bug.cgi?id=220

> Assertion failure: 'deco' on line 536 in file 'mtype.c'
> Tested with DMD-Windows 0.160 and 0.161.
> Very easy workaround (just add parentheses).
> ---
> template echidna(char[] str)
> {
>     const int echidna = 1;
> }
>
> // Must be 'typedef', can be any function or delegate
> typedef int function (int) platypus;
>
> // If you uncomment this next line, _both_ asserts will compile!
> //static assert( echidna!((platypus).mangleof) == 1);
>
> static assert( echidna!(platypus.mangleof) == 1);

Added to DStress as
http://dstress.kuehne.cn/compile/m/mangelof_16_A.d
http://dstress.kuehne.cn/compile/m/mangelof_16_B.d
http://dstress.kuehne.cn/compile/m/mangelof_16_C.d
http://dstress.kuehne.cn/compile/m/mangelof_16_D.d
http://dstress.kuehne.cn/compile/m/mangelof_16_E.d
http://dstress.kuehne.cn/compile/m/mangelof_16_F.d
http://dstress.kuehne.cn/compile/m/mangelof_16_G.d
http://dstress.kuehne.cn/compile/m/mangelof_16_H.d

Thomas


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

iD8DBQFEo7O23w+/yD4P9tIRAjdTAKCx27qp05lOFSHnGXO6bYNdonC8egCgkkn1
ckzfVdtkFU0u03wI6ojkaXE=
=XT2l
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list