digitalmars.D.bugs - [Issue 2808] New: 'nothrow' nested functions cannot be parsed
- d-bugmail puremagic.com (23/23) Apr 06 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2808
- d-bugmail puremagic.com (19/19) Apr 06 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2808
- d-bugmail puremagic.com (4/4) Apr 10 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2808
- d-bugmail puremagic.com (7/8) Apr 12 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2808
- d-bugmail puremagic.com (9/9) May 07 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2808
http://d.puremagic.com/issues/show_bug.cgi?id=2808 Summary: 'nothrow' nested functions cannot be parsed Product: D Version: 2.027 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: clugdbug yahoo.com.au nothrow void foo(){ void bar1() nothrow {} // ok nothrow void bar2() {} // fails bar1(); } --- bug.d(3): found 'nothrow' instead of statement bug.d(4): no identifier for declarator bar1 bug.d(5): unrecognized declaration --
Apr 06 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2808 clugdbug yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch I can make this work by changing parse.c line 3200. It surprises me that this is in Parser::parseStatement; but since it's in the label "Ldeclaration", I believe it is correct. It means that code like "nothrow int x=7;" is accepted, but that's accepted at global scope already. So I don't think there's anything wrong with this patch. #if DMDV2 case TOKimmutable: case TOKshared: case TOKnothrow: // add this line #endif // case TOKtypeof: Ldeclaration: --
Apr 06 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2808 It needs a TOKpure added as well. --
Apr 10 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2808It needs a TOKpure added as well.I'm not sure that you want to allow 'pure' on nested functions at all, because of bug 2807. If it is allowed, a pure nested function needs to treat all of the variables in the parent function as if they were globals. --
Apr 12 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2808 clugdbug yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed DMD2.029 --
May 07 2009