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.
*** Issue 8547 has been marked as a duplicate of this issue. ***
*** Issue 10546 has been marked as a duplicate of this issue. ***
*** Issue 10760 has been marked as a duplicate of this issue. ***
*** Issue 8097 has been marked as a duplicate of this issue. ***
*** This issue has been marked as a duplicate of issue 14145 ***