digitalmars.D.bugs - [Issue 8387] New: Semantic errors in opDispatch body are not reported
- d-bugmail puremagic.com (42/42) Jul 13 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8387
- d-bugmail puremagic.com (6/6) Sep 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8387
http://d.puremagic.com/issues/show_bug.cgi?id=8387 Summary: Semantic errors in opDispatch body are not reported Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: justin economicmodeling.com --- Comment #0 from Justin Whear <justin economicmodeling.com> 2012-07-13 15:16:11 PDT --- If an opDispatch function has a semantic error inside the body a misleading error will be reported at the call site. Example: --------------------test.d---------------------- struct Foo { int opDispatch(string prop)() property { pragma(msg, prop); thisFunctionDoesntExist(); return 1; } } void main() { import std.stdio; Foo bar; writeln(bar.baz); } ------------------------------------------------- Run: dmd test.d && ./test baz test.d(15): Error: undefined identifier 'baz' The pragma clearly shows that opDispatch template is being instantiated, but it seems to bail when an error is encountered, leading to the "undefined identifier" error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 13 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8387 --- Comment #1 from Daniel Cousens <daniel350 bigpond.com> 2012-09-22 03:24:53 PDT --- *** Issue 8547 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: -------
Sep 22 2012