Thread overview | |||||
---|---|---|---|---|---|
|
November 12, 2006 [Issue 494] New: template's variadic argument can't use as type | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=494 Summary: template's variadic argument can't use as type Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: lovesyao@hotmail.com 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 } -- |
November 15, 2006 [Issue 494] template's variadic argument can't use as type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=494 deewiant@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from deewiant@gmail.com 2006-11-15 02:56 ------- Fixed DMD 0.174. -- |
December 23, 2006 Re: [Issue 494] New: template's variadic argument can't use as type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@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 |
Copyright © 1999-2021 by the D Language Foundation