[Issue 15613] Parameter type mismatch error message are not very helpful

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 31 13:32:55 UTC 2022


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |FIXED

--- Comment #9 from RazvanN <razvan.nitu1305 at gmail.com> ---
The initial issue has been fixed, please do not reopen but file a new bug
report when new manifestations of the bug appear.

Now, for the overload example, I don't think that we should also take care of
that one too. It has been the philosophy of D to not be too verbose with error
messages. Imagine that if you have more than 2 functions in the overload set
you will be littered with all of the information. I think that the current
output is very nice and helpful:

test.d(6): Error: none of the overloads of `fun` are callable using argument
types `(double, double)`
test.d(1):        Candidates are: `test.fun(int a, double b)`
test.d(3):                        `test.fun(double a, int b)`

I think that this is enough. Anyway, if you do not agree, please file a new
issue as this one has been fixed already.

--


More information about the Digitalmars-d-bugs mailing list