Thread overview
[Issue 23898] Incorrect error message when function not found
May 06, 2023
ryuukk_
May 06, 2023
ryuukk_
May 08, 2023
Vladimir Panteleev
May 06, 2023
https://issues.dlang.org/show_bug.cgi?id=23898

ryuukk_ <ryuukk.dev@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |All
                 OS|Windows                     |All

--
May 06, 2023
https://issues.dlang.org/show_bug.cgi?id=23898

--- Comment #1 from ryuukk_ <ryuukk.dev@gmail.com> ---
It should say something like:

onlineapp.d(6): Error: no property `get` for type `Something`.

--
May 08, 2023
https://issues.dlang.org/show_bug.cgi?id=23898

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

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

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to ryuukk_ from comment #1)
> It should say something like:
> 
> onlineapp.d(6): Error: no property `get` for type `Something`.

We can't do that, because then

///////////////// test.d /////////////////
auto functionIWantToCall(T)(T v)
if (is(T == long))
{
    // ...
}

void main()
{
    auto result = 5.functionIWantToCall();
}
//////////////////////////////////////////

will produce "Error: no property `functionIWantToCall` for type `int`", and the user would be in their right to say "What do you mean, it's right there!".

But maybe for UFCS calls there could be a message that is between the two.

--