[Issue 1192] New: broken overridden-function parameter list matching

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 26 19:00:35 PDT 2007


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

           Summary: broken overridden-function parameter list matching
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thecybershadow at gmail.com


MyProgram.d(558): function std.string.toString called with argument types:
        (long,int)
matches both:
        std.string.toString(long,uint)
and:
        std.string.toString(ulong,uint)

The first argument has a perfect match, yet DMD is complaining about an
ambiguous match when in both matches the SECOND argument is the same!

Also, toString(x, uint) should be changed to toString(x, int) because the base
is most likely to be a literal, and numeric literals are of type int.


-- 



More information about the Digitalmars-d-bugs mailing list