Mercurial > projects > dstress
changeset 351:9cf29a72bdaf
delegate/function - nested functions
Walter <walter@digitalmars.com>
2005-03-22
mail:002401c52ea2$ff873d80$0200a8c0@colossus
author | thomask |
---|---|
date | Tue, 22 Mar 2005 08:23:49 +0000 |
parents | c487647fef87 |
children | e31fca2c8852 |
files | nocompile/bug_e2ir_299_A.d run/bug_e2ir_299_A.d run/bug_e2ir_299_B.d |
diffstat | 3 files changed, 24 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bug_e2ir_299_A.d Tue Mar 22 08:23:49 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ h3r3tic <foo@bar.baz> +// @date@ 2004-12-24 +// @uri@ news:cqi3v3$r2o$1@digitaldaemon.com +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2601 + +// function literals cannot call nested functions + +// __DSTRESS_ELINE__ 19 + +module dstress.nocompile.bug_e2ir_299_A; + +int main(){ + void foo() {} + void function() bar = function void() { + foo(); + }; + return 0; +}
--- a/run/bug_e2ir_299_A.d Tue Mar 22 08:16:05 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ h3r3tic <foo@bar.baz> -// @date@ 2004-12-24 -// @uri@ news:cqi3v3$r2o$1@digitaldaemon.com -// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2601 - -module dstress.run.bug_e2ir_299_A; - -int main(){ - void foo() {} - void function() bar = function void() { - foo(); - }; - return 0; -} \ No newline at end of file