Bug 1131 – New overload conflict

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-04-12T11:42:00Z
Last change time
2014-02-16T15:25:43Z
Assigned to
bugzilla
Creator
chris

Comments

Comment #0 by chris — 2007-04-12T11:42:54Z
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 }
Comment #1 by bugzilla — 2007-04-12T13:18:06Z
The example, as the report says, works fine. I put it in the test suite anyway. But I can't do anything with this without an example that fails.
Comment #2 by smjg — 2007-09-29T07:41:08Z
What was the point of posting, instead of a testcase, code that isn't a testcase?