https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1135 Summary: foreach steps Product: Swift Version: trunk Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: General AssignedTo: [email protected] ReportedBy: [email protected] The script: foreach i in [10:10:0] { tracef("Iteration %i\n", i); } results in an infinite loop, where i always equals 10. foreach i in [10:20:-1] { tracef("Iteration %i\n", i); } This results in an infinite loop, with i decreasing forever. Should there be a check to only allow positive step values? -- Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.