float init 0 request

Nick Treleaven nick at geany.org
Fri Aug 21 10:34:23 UTC 2026


On Wednesday, 19 August 2026 at 21:25:47 UTC, H. S. Teoh wrote:
> Rather, the incorrectness of having a char literal match an int 
> function over a wchar function becomes a source of bugs.

Again, no:
```d
char f(int) => 'i';
char f(wchar) => 'w';

void main()
{
     import std.stdio;
     'c'.f.writeln; // prints 'w'
}
```

Presumably what you meant is e.g. a char argument matching short 
instead of dchar, because short is more specialized.


More information about the Digitalmars-d mailing list