[Issue 9686] New: Wrong ambiguity overloading error for functions with signed/unsigned integral arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 10 22:55:30 PDT 2013


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

           Summary: Wrong ambiguity overloading error for functions with
                    signed/unsigned integral arguments
           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-03-11 08:55:29 MSK ---
---
void f(ulong) { }
void f(long) { }

void main()
{
    ushort us;
    short s;
    uint ui;
    int i;
    static assert(!__traits(compiles, f(us))); // OK
    static assert(!__traits(compiles, f(ui))); // OK
    f(s);  // "matches both" error, but matches only `f(long)`
    f(i);  // same error
}
---

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