[Issue 11436] New: Wrong ambiguity overloading error for functions with default arguments if there is an implicit cast

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 4 03:09:11 PST 2013


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

           Summary: Wrong ambiguity overloading error for functions with
                    default arguments if there is an implicit cast
           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: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-11-04 14:09:08 MSK ---
---
class C {}
void f(Object child, bool b1, bool b2, int i = 0) {}
void f(Object child, bool b1, int i) {}

void main()
{
    C c = new C;
    f(null, true, true); // ok
    f(new Object, true, true); // ok
    f(new C, true, true); // Error: ...(C, bool, bool) matches both:...
}
---

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