Thread overview
[Issue 21917] Unused default values for IFTI parameters should not be typechecked against the IFTI-inferred type
May 13, 2021
Vladimir Panteleev
May 13, 2021
Vladimir Panteleev
May 18, 2021
Vladimir Panteleev
Dec 17, 2022
Iain Buclaw
May 13, 2021
https://issues.dlang.org/show_bug.cgi?id=21917

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Looks like there is code to do this when resolving overloads:

https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d#L1175-L1177

Indeed, the example above works if modified simply by adding an overload:

void fun()(float a) {}

--
May 13, 2021
https://issues.dlang.org/show_bug.cgi?id=21917

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to Vladimir Panteleev from comment #1)
> Indeed, the example above works if modified simply by adding an overload:
> 
> void fun()(float a) {}

Oops, never mind that, the compiler just casts int to float.

--
May 18, 2021
https://issues.dlang.org/show_bug.cgi?id=21917

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21917

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--