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

           Summary: Lambdas default arguments problems
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-08-17 07:15:28 PDT ---
In C++0x default arguments are not allowed in lambdas. In D2 they are allowed,
but this program shows (compiled with dmd 2.048) that they have problems:


import std.stdio: writeln;
void foo(T)(T callme) {
    callme();
}
void main() {
    auto lam1 = (int x=5){ writeln(x); };
    auto lam2 = (int x=10){ writeln(x); };
    foo(lam1);
    foo(lam2);
}



Output:
5
5


Is it positive to disallow default arguments in D2 lambdas too?

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

Reply via email to