{"action":"opened","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2320","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2320/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2320/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2320/events","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2320","id":108100771,"number":2320,"title":"Broken Span/Measure iteration optimizations","user":{"login":"tombentley","id":879487,"avatar_url":"https://avatars.githubusercontent.com/u/879487?v=3","gravatar_id":"","url":"https://api.github.com/users/tombentley","html_url":"https://github.com/tombentley","followers_url":"https://api.github.com/users/tombentley/followers","following_url":"https://api.github.com/users/tombentley/following{/other_user}","gists_url":"https://api.github.com/users/tombentley/gists{/gist_id}","starred_url":"https://api.github.com/users/tombentley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombentley/subscriptions","organizations_url":"https://api.github.com/users/tombentley/orgs","repos_url":"https://api.github.com/users/tombentley/repos","events_url":"https://api.github.com/users/tombentley/events{/privacy}","received_events_url":"https://api.github.com/users/tombentley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-24T10:17:00Z","updated_at":"2015-09-24T10:17:00Z","closed_at":null,"body":"The tests for the `for` loop optimizations for measures and spans are currently broken.\r\n\r\nThe problem is that `Integer.neighbour` and `offset` were patched to throw `OverflowException`s with more helpful error messages. Unfortunately this means that when iterating some overflowing `Measure` or `Span` the optimized loop now throws an `OverflowException` with a different message than an unoptimized loop, because of the way the optimized loop is generated. Obviously this is an edge case, but previously the exceptions were indistinguishable except for their stacktraces.\r\n\r\nFixing this will require revisiting the code we generate for the optimized loop, which is slow and tedious work. I think we should defer doing that till 1.3."}}