http://d.puremagic.com/issues/show_bug.cgi?id=7057
Summary: Compiler errors on different functions on argument mismatch Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-12-02 17:47:47 PST --- struct Foo { void test(int) { } void test(int, int, string, string, int) { } } void main() { Foo foo; foo.test(0, 0, "", ""); } test.d(10): Error: function test.Foo.test (int _param_0) is not callable using argument types (int,int,string,string) test.d(10): Error: expected 5 function arguments, not 4 This is extremely confusing in a library that has multiple function overloads. The compiler first prints out the first function, but then prints out the argument count of the second function which was the best match. It should *not* talk about the first function at all if the second is more likely a match. The error message should be: test.d(10): Error: function test.Foo.test (int _param_0,int _param_1,string _param_2,string _param_3) is not callable using argument types (int,int,string,string) test.d(10): Error: expected 5 function arguments, not 4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------