[Issue 7201] New: Lambda template assignment to variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 2 09:54:35 PST 2012


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

           Summary: Lambda template assignment to variable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-01-02 09:54:34 PST ---
In DMD 2.058head the compiler accepts a function template as argument for the
foo() function:

void foo(int function(int x) g) {}
void main() {
    foo((x) => 0); // OK
}


So I think it should accept an assignment too:

void main() {
    int function(int x) f;
    f = (x) => 0; // Error
}


Currently it gives:
test.d(3): Error: __lambda4 has no value

-- 
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