http://d.puremagic.com/issues/show_bug.cgi?id=2521
Summary: Not possible to return immutable value by ref Product: D Version: 2.022 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: aa...@interia.pl module Test; immutable int val = 23; ref int func() { return val; } void main() { } ---- Result - compilation error: quicktest.d(3): Error: cast(int)23 is not an lvalue --