Mercurial > projects > dstress
view run/t/template_32_K.d @ 1613:70a23cb6a616
Fix incorrect run.t.throw_07_A/B tests
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 10 May 2009 12:10:34 +0200 |
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_K; 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!(2); if(x != 3){ assert(0); } return 0; }