struct Foo { @property void x(int) {} } struct Bar { Foo foo; void opDispatch(string Field, Args...)(Args args) { foo.x = args; } } void main() { Bar bar; bar.x = 5; } Error: expected 1 function arguments, not 0 Of course there's no way DMD can tell in advance that opDispatch will invoke a property function, so it just expects opDispatch to return an lvalue to be assigned with 5. :/
The provided code compiles and runs as of v2.065.