digitalmars.D.bugs - [Issue 7558] New: Useless 'cannot implicitly convert' errors when number of function arguments is wrong
- d-bugmail puremagic.com (23/23) Feb 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7558
- d-bugmail puremagic.com (10/10) Feb 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7558
- d-bugmail puremagic.com (21/21) Feb 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7558
http://d.puremagic.com/issues/show_bug.cgi?id=7558 Summary: Useless 'cannot implicitly convert' errors when number of function arguments is wrong Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: clugdbug yahoo.com.au --- Comment #0 from Don <clugdbug yahoo.com.au> 2012-02-21 07:14:03 PST --- 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7558 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-02-21 11:15:36 PST --- An example demonstrating this would be useful. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7558 --- Comment #2 from Don <clugdbug yahoo.com.au> 2012-02-21 13:29:21 PST --- 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? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 21 2012