https://issues.dlang.org/show_bug.cgi?id=18825
Issue ID: 18825 Summary: No syntax for function literal returning a reference Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: j...@leroy.nyc Consider: int global; int foo() { return global; } As per the doc, this is equivalent to: auto foo = function int() { return global; }; But it is not possible to create a function literal equivalent to this: ref int foo() { return global; } I tried placing the ref everywhere it makes sense, to no avail. --