Deprecate implicit `int` to `bool` conversion for integer literals
Michael V. Franklin
slavo5150 at yahoo.com
Wed Nov 15 04:45:35 UTC 2017
On Wednesday, 15 November 2017 at 04:30:32 UTC, Walter Bright
wrote:
> I just tried:
>
> import core.stdc.stdio;
> void foo(char c) { printf("char\n"); }
> void foo(int c) { printf("int\n"); }
> void main() {
> enum int e = 1;
> foo(e);
> foo(1);
> foo('c');
> }
>
> and it prints:
>
> int
> int
> char
The code posted was incorrect. See
http://forum.dlang.org/post/mailman.154.1510704335.9493.digitalmars-d@puremagic.com
More information about the Digitalmars-d
mailing list