implicit cast and overload priority
bkoie
blaa at some.com
Fri Feb 14 05:00:45 UTC 2025
On Friday, 14 February 2025 at 04:28:25 UTC, Dom DiSc wrote:
> Why does this happen:
>
> ```d
> void foo(long x) { }
> void foo(ulong x) { }
>
> [...]
trying to confused the compiler
try that in c++ it will compile with no warnings
how would the compiler actually know the dif between ulong 1,
long 1, if not negative you prefixed some anotation ideally
the short matches because it can be fitted or casted ideally
More information about the Digitalmars-d-learn
mailing list