http://d.puremagic.com/issues/show_bug.cgi?id=2753
Summary: Cannot declare pointer to function returning ref Product: D Version: 2.025 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: jlqu...@optonline.net ref int c() { static int a=2; return a; } ref int function() d = &c; // line 8 foo.d(8): variable foo.d only parameters or foreach declarations can be ref Type inference, however, is able to figure it out: ref int c() { static int a=2; return a; } auto d = &c; // whee Correctly reporting the issue from bug 2735 --