[Issue 494] New: template's variadic argument can't use as type
Thomas Kuehne
thomas-dloop at kuehne.cn
Sat Dec 23 13:20:15 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-11-12:
> http://d.puremagic.com/issues/show_bug.cgi?id=494
> template test(TA...){
> const TA[0] test=0;
> }
>
> template test2(TA...){
> const TA[0] test2=TA[0].init;
> }
>
> typedef int dummy=0;
> typedef int myint=3;
>
> void main(){
> assert(test!(int)==0);//failed
> assert(test2!(int)==int.init);//failed
> assert(test2!(myint)==myint.init);//failed
> assert(test!(int,dummy)==0);//failed
> assert(test2!(int,dummy)==int.init);//failed
> assert(test2!(myint,dummy)==myint.init);//failed
> }
Added to DStress as
http://dstress.kuehne.cn/compile/t/tuple_07_A.d
http://dstress.kuehne.cn/compile/t/tuple_07_B.d
http://dstress.kuehne.cn/compile/t/tuple_07_C.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFjY+lLK5blCcjpWoRAgFXAJ9XYvsX/+sAVbYOVg4UbBOOv71kGQCfX7fI
HCjpJqQqRRIqzj/Z3c5LnKQ=
=21q6
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list