[Issue 14187] Wrong overload resolution when one of the parameters to a function is an interface

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 25 05:26:15 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14187

yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com

--- Comment #1 from yebblies <yebblies at gmail.com> ---
I'm not really sure if this is a bug, or just an unpleasant side effect of the
way overloading is worked out.

IIRC the worst conversion out of all the args is taken as the match level for
each function, and for both of those overloads the C -> I conversion is the
worst, so they have the same match level and are ambiguous.  It might be
possible to tweak the match levels to fix this, I don't know.

There are probably other similar cases with other conversions that have the
same match level as C -> I.

--


More information about the Digitalmars-d-bugs mailing list