Thread overview
[Issue 16459] opDispatch gives obtuse error when dispatching to a function that doesn't exist
Jun 26, 2017
Vladimir Panteleev
Jun 26, 2017
Vladimir Panteleev
Nov 10, 2022
RazvanN
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=16459

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=16459

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
                 CC|dlang-bugzilla@thecybershad |
                   |ow.net                      |
           Hardware|x86_64                      |All
                 OS|Windows                     |All
           Severity|major                       |normal

--
November 10, 2022
https://issues.dlang.org/show_bug.cgi?id=16459

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
This seems to have been improved now. In the first case it gives:

test.d(14): Error: no property `doSomething` for `someObject` of type
`test.SomeObject!int`
test.d(14):        potentially malformed `opDispatch`. Use an explicit
instantiation to get a better error message

So, at least it gives you a hint that this may be the problem.

The idea is that currently the compiler cannot know if the error comes from passing the wrong arguments to opDispatch or if the error comes from within the innards of opDispatch that is why it just asks the user to call opDispatch explicitly.

I think that until we find a way to deal with opDispatch this should be enough.

--