http://d.puremagic.com/issues/show_bug.cgi?id=8189
Summary: const ref foreach iteration too 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-06-03 03:49:37 PDT --- void foo(const ref int x) {} // OK void main() { int x = 1; foo(x); const(int)[] array; foreach (ref const int i; array) {} // OK foreach (const ref int i; array) {} // error } DMD 2.060alpha, after Issue 3290 : test.d(7): Error: basic type expected, not ref test.d(7): Error: no identifier for declarator const(int) test.d(7): Error: found 'ref' when expecting ';' test.d(7): Error: found 'i' when expecting '.' following int test.d(7): Error: found ';' when expecting identifier following 'int.' test.d(7): Error: found 'array' when expecting ')' test.d(7): Error: found ')' instead of statement test.d(8): Error: unrecognized declaration -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------