[Issue 1131] New: New overload conflict
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Apr 12 09:42:55 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1131
           Summary: New overload conflict
           Product: D
           Version: 1.011
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: chris at dprogramming.com
Overload conflict introduced in DMD v1.011.
Code similar to the following has the problem, although the code tested by
itself doesn't cause the error:
struct Color
{
        static void fromRgb(uint rgb)
        {
        }
        static void fromRgb(ubyte alpha, uint rgb)
        {
        }
}
void main()
{
        Color.fromRgb(0); // Error: (0) matches with both (uint) and (ubyte,
uint)
        Color.fromRgb(cast(uint)0); // Works
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list