https://issues.dlang.org/show_bug.cgi?id=14353
--- Comment #5 from [email protected] --- (In reply to Shammah Chancellor from comment #3) > I'm not so sure this is desirable. What if there add as a ref return. What > does &t.foo give then? You mean something like the following? ---- struct T { int i = 42; ref int foo() {return i;} } void main() { T t; auto dg = &t.foo; auto i = &t.foo(); } ---- Here dg is a delegate of the method foo and i is a pointer to the ref-returned field i. The spec says this [1]: "In most places, getter property functions are called immediately. One exceptional case is the address operator." "Even if the given operand is a property function, the address operator returns the address of the property function rather than the address of its return value." Now foo is no @property, but the spec says that "[if] a function call does not take any arguments syntactically, it is callable without parenthesis, like a getter property functions." So it's reasonable that the same rules apply. [1] http://dlang.org/function.html#property-functions --
