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?