Deprecate implicit `int` to `bool` conversion for integer literals
Michael V. Franklin
slavo5150 at yahoo.com
Wed Nov 15 01:58:17 UTC 2017
On Tuesday, 14 November 2017 at 23:53:49 UTC, H. S. Teoh wrote:
> Argh, should've checked before I posted. What I meant was more
> something like this:
>
> import std.stdio;
> void f(dchar) { writeln("dchar overload"); }
> void f(ubyte) { writeln("ubyte overload"); }
> void main() {
> f(1);
> f('a');
> }
>
> Output:
> ubyte overload
> ubyte overload
>
> It "makes sense" from the POV of C/C++-compatible integer
> promotion rules, but in the context of D, it's just very
> WAT-worthy.
If you haven't already, can you please submit this to bugzilla.
Thanks,
Mike
More information about the Digitalmars-d
mailing list