www.digitalmars.com         C & C++   DMDScript  

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

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 puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg 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: -------
Nov 04 2013