Mercurial > projects > dstress
view run/n/nested_function_07_B.d @ 1410:be2b20dc0eb4
added bugzilla URIs
author | thomask |
---|---|
date | Thu, 08 Mar 2007 16:36:19 +0000 |
parents | 3636e44bf753 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Fredrik Olsson <peylow@gmail.com> // @date@ 2005-11-30 // @uri@ news:dmjkbv$31is$1@digitaldaemon.com // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1033 module dstress.run.n.nested_function_07_B; int outer() { int a = 3; int inner(int b) { a += b; if (b > 0) { return inner(b - 1); } else { return a; } } return inner(a); } int main(char[][] args) { assert(outer() == 9); return 0; }