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

           Summary: Problem with -inline with lazy arguments and inner
                    functions
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2011-08-17 07:47:52 PDT ---
A reduced program:


int foo(int n, lazy int x) {
    int inner() {
        n--;
        return foo(n, inner());
    };
    return n <= 0 ? n : inner();
}
void main() {
    assert(foo(10, 1) == 0);
}



With DMD 2.055beta it compiles and runs correctly.

But compiling it with -inline DMD gives:

test.d(4): Error: delegate test.foo.inner.__dgliteral3 is a nested function and
cannot be accessed from foo

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to