Deprecate implicit `int` to `bool` conversion for integer literals

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Nov 16 07:24:44 UTC 2017


On 11/14/17 11:33 PM, Michael V. Franklin wrote:
> On Wednesday, 15 November 2017 at 04:24:58 UTC, Walter Bright wrote:
>> On 11/14/2017 5:20 AM, Nick Treleaven wrote:
>>> An very similar problem exists for int and char overloads:
>>>
>>> alias foo = (char c) => 1;
>>> alias foo = (int i) => 4;
>>>
>>> enum int e = 7;
>>> static assert(foo(e) == 4); // fails
>>
>> I cannot reproduce this error.
> 
> Try it here: https://run.dlang.io/is/nfMGfG
> DMD-nightly

Cool, thanks. That seems to be an unrelated bug. Have you added it to 
bugzilla? Thanks! -- Andrei


More information about the Digitalmars-d mailing list