Comment #0 by default_357-line — 2018-08-20T06:06:44Z
$ dmd test.d
test.d(9): Error: no property foo for type S
---
module test;
struct S {
void opDispatch(string name, T)(T arg) { }
}
void main() {
S s;
s.foo(LanguageError);
}
---
Note that as compared to Issue 14145, the problem here is that the *call* to opDispatch doesn't even compile, which should surely error on its own. There is no way that opDispatch can be written that makes this code valid.
Comment #1 by github-bugzilla — 2018-08-20T19:09:40Z