Test code: struct Rect { int x,y,w,h; } void pass(ref Rect rect) { } Rect get() { return Rect(); } void main() { pass(get); } Note that this is a regression since DMD2.025
Compiler output (dmd2.028): test.d(17): Error: function test.pass (ref Rect rect) does not match parameter types (Rect) test.d(17): Error: get() is not an lvalue
Looks like a deliberate change, see BUG 2621.
This is the same as bug 3167. Although this report is older, it's the later one which Walter commented on. So I'm closing this one.
*** This issue has been marked as a duplicate of issue 3167 ***