[Issue 23898] Incorrect error message when function not found

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 8 09:39:05 UTC 2023


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

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

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

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla at 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.

--


More information about the Digitalmars-d-bugs mailing list