http://d.puremagic.com/issues/show_bug.cgi?id=5306
Summary: Disallow foreach ref on numeric interval Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-12-01 18:24:54 PST --- This code compiles and runs with no errors with DMD 2.050, but I think this code is meaningless so it needs to be disallowed statically (items in the interval are not lvalues): void main() { foreach (ref i; 0 .. 10) { i++; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------