[Issue 8402] New: Lambda argument's default value is not taken into account

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 20 05:33:25 PDT 2012


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

           Summary: Lambda argument's default value is not taken into
                    account
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kolos80 at bk.ru


--- Comment #0 from Artem Borisovskiy <kolos80 at bk.ru> 2012-07-20 05:33:24 PDT ---
The following code does not compile (x.d):

void main()
{
    auto fn = (int x = 0) => x + 1;
    fn();
}

with message: "x.d(4): Error: expected 1 function arguments, not 0"
However, calling fn() with an explicit argument works fine as usual.

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