http://d.puremagic.com/issues/show_bug.cgi?id=5959
Summary: Return by reference with nested function should be allowed Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-05-08 12:06:04 PDT --- Define nested ref function is not allowed with current dmd, but should be. ---- int n; void main() { ref int f(){ return n; } // NG // nothrow ref int f(){ return n; } // OK // auto ref int f(){ return n; } // OK f() = 1; assert(n == 1); ---- See parse.c, calling route parseDeclDefs -> parseDeclaration changed with dmd 2.020(Fixing issue 2345), but did not changed parseStatement -> parseDeclaration from git brame. It seems to me that this is a parser problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------