[Issue 7649] New: Bad lambda inference in default function argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 5 06:15:33 PST 2012


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

           Summary: Bad lambda inference in default function argument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-03-05 06:15:33 PST ---
Case code:
----
void main()
{
    void foo(int function(int) fp = x => 1)
    {
        assert(fp(1) == 1);
    }
    foo();
}

Output:
----
test.d(6): Error: undefined identifier __T1
test.d(6): Error: forward reference to __lambda2

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


More information about the Digitalmars-d-bugs mailing list