When the compiler reports errors of the form "expected 6 function arguments, not 5", trying to implicitly convert the first 5 arguments generates spurious "cannot implicitly convert XXX to YYY" errors. To add value, the compiler could try to work out which argument is missing; unless it does that, it shouldn't attempt the conversion.
An example demonstrating this would be useful.
void bug7558(string x, int y, double z) {} void main() { bug7558(4, 2.2); } DMD 1.073 / 2.057: bug.d(5): Error: function bug.bug7558 (char[],int,double) does not match paramet er types (int,double) bug.d(5): Error: cannot implicitly convert expression (4) of type int to char[] bug.d(5): Error: cannot implicitly convert expression (2.2) of type double to in t bug.d(5): Error: expected 3 function arguments, not 2 But the second and third errors don't happen in 2.058. Looks like this is a D1 only bug -- a patch that didn't get merged?
Seems to have been fixed in git HEAD: ----- $ cat test.d void bug7558(string x, int y, double z) {} void main() { bug7558(4, 2.2); } $ dmd test.d test.d(5): Error: function test.bug7558 (string x, int y, double z) is not callable using argument types (int, double) $ ----- No extraneous errors were given.
(In reply to hsteoh from comment #3) > Seems to have been fixed in git HEAD: > ----- > $ cat test.d > void bug7558(string x, int y, double z) {} > > void main() > { > bug7558(4, 2.2); > } > $ dmd test.d > test.d(5): Error: function test.bug7558 (string x, int y, double z) is not > callable using argument types (int, double) > $ > ----- > No extraneous errors were given. Did you test it with D1?
Hmph, didn't notice it was marked for both D1 and D2. Should this be reopened for D1 then?
(In reply to hsteoh from comment #5) > Hmph, didn't notice it was marked for both D1 and D2. Should this be > reopened for D1 then? Probably.
D1 is no longer supported/ Closing as WORKSFORME.