[Issue 790] New: arbitrary lookahead for nested functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 3 15:27:06 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=790

           Summary: arbitrary lookahead for nested functions
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: Daniel919 at web.de


void main() {
        int a() { return b(1); }
        int b(int y = 0) { if (y == 0) return a(); else return y; }
        b();
}

line 2: Error: undefined identifier b

If you put the implementation of function a and b outside (into global scope),
then it's working.
So the lookahead is not working for nested functions.


-- 



More information about the Digitalmars-d-bugs mailing list