917
|
1 // $HeadUR$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Dave <Dave_member@pathlink.com>
|
|
6 // @date@ 2006-03-18
|
|
7 // @uri@ news:dvgq34$22hv$1@digitaldaemon.com
|
1380
|
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=487
|
917
|
9
|
|
10 module dstress.run.t.template_32_O;
|
|
11
|
|
12 template sum(ifloat x){
|
|
13 static if (x <= 1.0fi){
|
|
14 const ifloat sum = x;
|
|
15 }else{
|
|
16 const ifloat sum = x + sum!(x - 1.0fi);
|
|
17 }
|
|
18 }
|
|
19
|
|
20 int main(){
|
|
21 ifloat x = sum!(1.0fi);
|
|
22
|
|
23 if(x != 1.0fi){
|
|
24 assert(0);
|
|
25 }
|
|
26
|
|
27 return 0;
|
|
28 }
|