I think this code is correct: @property int[] foo() { return [1, 2]; } int[] bar(int[] a) { return a; } void main() { bar(foo); // OK foo.bar(); // line 9, Error } But DMD 2.057head gives: test.d(9): Error: function expected before (), not bar(foo()) of type int[] This makes the usage of D language less uniform, because code like this is refused (and sometimes you can't replace an array attribute by a @property getter because of this): auto sortedAKeys = a.keys.sort(); // error
https://github.com/D-Programming-Language/dmd/pull/468
https://github.com/D-Programming-Language/dmd/commit/7c193950c9d7fa8798b93961fd00e215998149bc