Mercurial > projects > dstress
diff nocompile/debug_info_02.d @ 387:b1bb3423e2c3
contains a circular reference
author | thomask |
---|---|
date | Wed, 06 Apr 2005 07:42:30 +0000 |
parents | |
children | 0ea4c218a3ee |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/debug_info_02.d Wed Apr 06 07:42:30 2005 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Regan Heath <regan@netwin.co.nz> +// @date@ 2005-03-25 +// @uri@ news:opsn61vgpg23k2f5@nrage.netwin.co.nz + +// __DSTRESS_DFLAGS__ -g +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.debug_info_02; + +typedef fn function() fn; + +byte status; + +fn foo() { + status++; + return &foo; +} + +int main(){ + assert(status==0); + fn p = foo(); + assert(status==1); + p(); + assert(status==2); + return 0; +}