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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #5 from Don <clugd...@yahoo.com.au> 2010-11-26 22:17:30 PST ---
> I don't see any good reason for this strictness.
There is a good reason. It was a deliberate decision.
I do not know how the rules could be weakened, without major changes to the
lookup rules.

Originally, the test cases did compile. But the problem is, with the broken
implicit conversion rules we've inherited from C, it interferes with function
overloading in a horrible way.

Consider:
void foo(real x);

Then you add
void foo(creal x);

And suddenly foo(7.0); doesn't compile any more.

The implicit conversions real -> creal were removed for this reason. It's the
lesser of two evils.

Now, I've been planning a proposal for changing the implicit conversion rules
for numeric literals, and possibly that make this possible as well. But it's a
big change, even for D2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to