digitalmars.D.bugs - [Issue 8549] New: Bad error message with const methods
- d-bugmail puremagic.com (33/33) Aug 15 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (15/15) Oct 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (9/10) Oct 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (10/17) Oct 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (7/8) Oct 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (10/16) Oct 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
- d-bugmail puremagic.com (7/8) Oct 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8549
http://d.puremagic.com/issues/show_bug.cgi?id=8549 Summary: Bad error message with const methods Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc This needs a much better error message: struct Foo { int[] opSlice() { return [0]; } } struct Bar { Foo spam; const(Foo) bar() const { return spam; } } void main() { Bar().bar()[]; } DMD 2.061alpha gives: test.d(11): Error: function test.Foo.opSlice () is not callable using argument types () -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 15 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |DUPLICATE 20:57:41 PDT --- Issue6707 covers this, the error message is now: test.d(11): Error: function test.Foo.opSlice () is not callable using argument types () const *** This issue has been marked as a duplicate of issue 6707 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549Issue6707 covers this, the error message is now:I agree with closing this as dupe. But I think adding "const" at the end is not nearly enough to make the error message clear. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549 21:40:56 PDT ---I would take a bigger pull to fix this since there's a lot of code duplication in DMD. Personally I would change the message to: Error: function test.Foo.opSlice () is not callable using const(this) What do you think? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------Issue6707 covers this, the error message is now:I agree with closing this as dupe. But I think adding "const" at the end is not nearly enough to make the error message clear.
Oct 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549 21:41:21 PDT ---I would take*It* would take. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549I would take a bigger pull to fix this since there's a lot of code duplication in DMD. Personally I would change the message to: Error: function test.Foo.opSlice () is not callable using const(this) What do you think?Do you want me to reopen this bug report? Maybe an error message that tells what to do is better (not complete error message): test.d(11): Error: function test.Foo.opSlice() needs to be const to [...] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549Do you want me to reopen this bug report?I have reopened Issue 6707 instead. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 21 2012