PROPOSAL: Implicit conversions of integer literals to floating

Max Samukha spambox at d-coding.com
Fri Dec 31 00:40:36 PST 2010


On 12/31/2010 02:44 AM, Walter Bright wrote:
> Andrei Alexandrescu wrote:
>> I agree there's an issue here, but not only with floating point numbers:
>>
>> void fun(long);
>> void fun(ulong);
>> ...
>> fun(2); // whaa?
>
> That's a feature, not a bug.

void foo(string s);
void foo(wstring s);

foo("whoa");

This fails too and is very annoying. The bug report is here 
http://d.puremagic.com/issues/show_bug.cgi?id=4592. Is it valid?


More information about the Digitalmars-d mailing list