Mercurial > projects > dstress
view run/t/template_32_L.d @ 1519:f71bd33bb278
updated to DMD-1.013
author | thomask |
---|---|
date | Fri, 27 Apr 2007 17:22:49 +0000 |
parents | 902d2c168029 |
children |
line wrap: on
line source
// $HeadUR$ // $Date$ // $Author$ // @author@ Dave <Dave_member@pathlink.com> // @date@ 2006-03-18 // @uri@ news:dvgq34$22hv$1@digitaldaemon.com // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=487 module dstress.run.t.template_32_L; template sum(int x){ static if (x <= 1){ const int sum = x; }else{ const int sum = x + sum!(x - 1); } } int main(){ int x = sum!(3); if(x != 6){ assert(0); } return 0; }