digitalmars.D.bugs - [Issue 6981] New: incorrect error message when calling method without parentheses
- d-bugmail puremagic.com (33/33) Nov 20 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6981
- d-bugmail puremagic.com (9/9) Nov 20 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6981
- d-bugmail puremagic.com (18/18) Dec 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6981
http://d.puremagic.com/issues/show_bug.cgi?id=6981 Summary: incorrect error message when calling method without parentheses Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: mrmocool gmx.de --- Comment #0 from Trass3r <mrmocool gmx.de> 2011-11-20 13:48:56 PST --- class Document { const override hash_t toHash() { return super.toHash; } } Error: function object.Object.toHash () is not callable using argument types () If you change it into 'return super.toHash();' then it prints Error: function object.Object.toHash () is not callable using argument types () const OT: I really wish that horrible error message would be turned into something more easily understandable like 'function can't be called on a const instance' or whatever. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 20 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6981 --- Comment #1 from Trass3r <mrmocool gmx.de> 2011-11-20 13:57:30 PST --- Actually I think it shouldn't even get to that point. Shouldn't it complain about toHash not overriding a base method? The above error message isn't helpful at all, especially if the const isn't applied to the function directly but through a 'const: /*many functions*/'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 20 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6981 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |DUPLICATE --- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-12-27 17:50:19 PST --- Now it's: Error: not a property super.toHash After adding parens: Error: function object.Object.toHash () is not callable using argument types () const After Issue 1730 is fixed the error message will improve. *** This issue has been marked as a duplicate of issue 1730 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 27 2012