http://d.puremagic.com/issues/show_bug.cgi?id=9140
Summary: ref foreach of immutables in postcondition Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-12-10 20:46:32 PST --- immutable(int)[] bar() out(result) { foreach (ref r; result) {} } body { return null; } void main() {} I think the error is not correct, DMD 2.061alpha gives: test.d(3): Error: variable test.bar.result cannot modify result 'result' in contract -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------