[Issue 14916] opDispatch: no property error for parameter type mismatch

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 10 06:53:36 UTC 2022


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
The problem is that we now have 2 overloads and none match, therefore the
compiler simply goes with a generic error message "no property foo for s". This
is the correct behavior since the compiler does not have sufficient information
to distinguish which overload is less wrong.  However, the compiler now
additionally provides:

onlineapp.d(51):        potentially malformed `opDispatch`. Use an explicit
instantiation to get a better error message.

`opDispatch` is pretty much a black whole that eats up everything, therefore it
is close to impossible to find a logic that gives the best error message in
each situation. That is why this alternative was preferred.

I will close this as WONTFIX

--


More information about the Digitalmars-d-bugs mailing list