[Issue 8101] Display candidate function overloads when function call fails

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 2 15:32:07 PDT 2014


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

--- Comment #8 from bearophile_hugs at eml.cc ---
Now this code:


void foo(int) {}
void foo(int, int) {}
void bar(float) {}
void bar(double) {}
void bar(real) {}
void main() {
    foo;
    bar(1);
}


Gives:

temp.d(7,5): Error: None of the overloads of 'foo' are callable using argument
types (), candidates are:
temp.d(1,6):        temp.foo(int _param_0)
temp.d(2,6):        temp.foo(int _param_0, int _param_1)
temp.d(8,8): Error: temp.bar called with argument types (int) matches both:
temp.d(3,6):     temp.bar(float _param_0)
and:
temp.d(5,6):     temp.bar(real _param_0)


It uses the word "both" and it doesn't list temp.bar(double _param_0)

Is this worth opening another ER? :-)

--


More information about the Digitalmars-d-bugs mailing list