digitalmars.D.bugs - [Issue 10418] New: bad error message: "not a property"
- d-bugmail puremagic.com (41/41) Jun 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10418
- d-bugmail puremagic.com (8/8) Jun 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10418
- d-bugmail puremagic.com (14/27) Jun 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10418
- d-bugmail puremagic.com (13/22) Jun 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10418
- d-bugmail puremagic.com (6/6) Jun 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10418
http://d.puremagic.com/issues/show_bug.cgi?id=10418 Summary: bad error message: "not a property" Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: destructionator gmail.com 16:31:26 PDT --- === struct S { property void number(int a) { } } void main() { S s; s.number = "10"; } === $ dmd test22 test22.d(7): Error: not a property s.number As you can see, it obviously is a property, but it takes int and I gave it a string. A better message would be Error: not a property s.number(int) or better yet, Error: cannot implicitly convert expression ("10") of type string to int especially since there are no overloads. If there were, I think what would be best is something like: Error: no matching function "number" for arguments (string). Did you mean number(int)? Listing all possible overloads could lead to really spammy messages, but if it ran the spell check algorithm on the type signatures and gave the closest match(s), I think that would be manageable and generally useful, in all cases with overloaded functions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 19 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10418 16:32:20 PDT --- oops, I meant for the first better one: Not a property: number(string) since that's what it is trying to do, not number(int). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 19 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10418 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com 16:52:10 PDT ---=== struct S { property void number(int a) { } } void main() { S s; s.number = "10"; } === $ dmd test22 test22.d(7): Error: not a property s.numberHmm in git-head it's: test.d(12): Error: function test.S.number (int a) is not callable using argument types (string) Looks like it's fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 19 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10418 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXEDWhen bug 10103 was fixed, it had been improved at the same time. https://github.com/D-Programming-Language/dmd/pull/2047#discussion_r4298441 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------test22.d(7): Error: not a property s.numberHmm in git-head it's: test.d(12): Error: function test.S.number (int a) is not callable using argument types (string) Looks like it's fixed.
Jun 19 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10418 *** Issue 10417 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 19 2013