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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Severity|normal                      |enhancement

--- Comment #2 from RazvanN <[email protected]> ---
This is intended behavior. For more information check [1]. Long story short,
the current mechanism is in place to prevent hijacking. I guess an argument can
be made that in this case neither A nor C are implicitly convertible to B, but
to me this just seems like adding special cases when the alternative would be
to simply use an alias to introduce fun(B) in the same overload set as the
other fun methods.

I am inclined to close this as a WONTFIX. Either way, this is not a bug, but an
enhancement request by the current language rules.

[1] https://dlang.org/articles/hijack.html#derived-class-members

--

Reply via email to