[Issue 532] New: Wrong name mangling for template alias params of local vars

Thomas Kuehne thomas-dloop at kuehne.cn
Sat Nov 25 05:47:30 PST 2006


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

d-bugmail at puremagic.com schrieb am 2006-11-16:
> http://d.puremagic.com/issues/show_bug.cgi?id=532

> In this example, in moo!(A), the value of Mang!(A).mangledname depends on
> whether it is inside a 'static assert' or not. This seems to be a symptom of a
> more general problem: I've seen many similar effects, but this is the simplest
> so far.
>
> ---------
> template Mang(alias F)
> {
>     class G { }
>     alias void function (G ) H;
>     const char [] mangledname = typeof(H).mangleof;
> }
>
> template moo(alias A)
> {
>     const char [] a = Mang!(A).mangledname;
>     static assert(Mang!(A).mangledname == a); // FAILS !!!
> }
>
> void main()
> {
>     int q;
>     char [] b = moo!(q).a;
> }

Added to DStress as
http://dstress.kuehne.cn/compile/m/mangleof_19_A.d
http://dstress.kuehne.cn/compile/m/mangleof_19_B.d
http://dstress.kuehne.cn/compile/m/mangleof_19_C.d
http://dstress.kuehne.cn/compile/m/mangleof_19_D.d
http://dstress.kuehne.cn/compile/m/mangleof_19_E.d
http://dstress.kuehne.cn/compile/m/mangleof_19_F.d
http://dstress.kuehne.cn/compile/m/mangleof_19_G.d

Thomas


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

iD8DBQFFaEUsLK5blCcjpWoRAlGiAKCaYCpRKsMkuhre2cU48TbQL/cH5QCfUGKS
2I+momNVe3BO1MKnC22+u+c=
=pQ4D
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list