# HG changeset patch # User thomask # Date 1177695151 0 # Node ID 37c4fce34442d3a5f13d5aa22bee3a34958fe071 # Parent 36d8e64392df032ef5f087c1df7a09fa7274a8f5 [Issue 1178] templates - deduction + specialization won't compile Leo Dahlmann 2007-04-23 http://d.puremagic.com/issues/show_bug.cgi?id=1178 diff -r 36d8e64392df -r 37c4fce34442 reporter.txt --- a/reporter.txt Fri Apr 27 17:31:50 2007 +0000 +++ b/reporter.txt Fri Apr 27 17:32:31 2007 +0000 @@ -99,6 +99,7 @@ Kris , larrycowan Lars Ivar Igesund +Leo Dahlmann Li Jie Lionello Lunesu , Luís Marques diff -r 36d8e64392df -r 37c4fce34442 run/t/template_63_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_63_A.d Fri Apr 27 17:32:31 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Leo Dahlmann +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1178 +// @desc@ [Issue 1178] templates - deduction + specialization won't compile + +module dstress.run.t.template_63_A; + +template outer(O){ + O inner(I)(float x, I i){ + return cast(O) x; + } +} + +int main(){ + if(5.0L != outer!(double).inner!(char[])(5.0f, "hi")){ + assert(0); + } + + return 0; +} diff -r 36d8e64392df -r 37c4fce34442 run/t/template_63_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_63_B.d Fri Apr 27 17:32:31 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Leo Dahlmann +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1178 +// @desc@ [Issue 1178] templates - deduction + specialization won't compile + +module dstress.run.t.template_63_B; + +template outer(O){ + O inner(I)(float x, I i){ + return cast(O) x; + } +} + +int main(){ + if(5.0L != outer!(double).inner(5.0f, "hi")){ + assert(0); + } + + return 0; +} diff -r 36d8e64392df -r 37c4fce34442 run/t/template_63_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_63_C.d Fri Apr 27 17:32:31 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Leo Dahlmann +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1178 +// @desc@ [Issue 1178] templates - deduction + specialization won't compile + +module dstress.run.t.template_63_C; + +template outer(O){ + O inner(I)(float x, I i){ + return cast(O) x; + } +} + +int main(){ + if(5.0L != outer!(double).inner(5.0, "hi")){ + assert(0); + } + + return 0; +} diff -r 36d8e64392df -r 37c4fce34442 run/t/template_63_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_63_D.d Fri Apr 27 17:32:31 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Leo Dahlmann +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1178 +// @desc@ [Issue 1178] templates - deduction + specialization won't compile + +module dstress.run.t.template_63_D; + +template outer(O){ + O inner(I)(float x, I i){ + return cast(O) x; + } +} + +int main(){ + if(5.0L != outer!(double).inner!(char[])(5.0, "hi")){ + assert(0); + } + + return 0; +}