[Issue 284] New: Wrong type of template value parameter

Thomas Kuehne thomas-dloop at kuehne.cn
Mon Aug 14 03:17:27 PDT 2006


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

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

> struct A(int x) { }
>
> template B(uint x) {
>     static if (x == 3)
>         static assert(is(A!(3) == A!(x)));
> }
>
> static this() { B!(3); } 
>
> ---
>
> file.d(5): static assert  (is(A  == A )) is false
>
> ---
>
> Two instances of A!(3) is created. One with an int value type and the other one
> with a uint(!) value type. The mangled forms are *__T1AVi3Z1A and *__T1AVk3Z1A
> respectively.

For the mangling aspect see
http://d.puremagic.com/issues/show_bug.cgi?id=109

Thomas


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

iD8DBQFE4FsmLK5blCcjpWoRAu3yAJ4ovoL9rE78OwWyhWsKze0rHEdC8ACgnrAa
LrfyQ2b7PaBNIOj95s13bSQ=
=B//3
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list