{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2174","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2174/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2174/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2174/events","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2174","id":82230213,"number":2174,"title":"Sequence Tuple trouble (StackOverflow)","user":{"login":"jvasileff","id":236050,"avatar_url":"https://avatars.githubusercontent.com/u/236050?v=3","gravatar_id":"","url":"https://api.github.com/users/jvasileff","html_url":"https://github.com/jvasileff","followers_url":"https://api.github.com/users/jvasileff/followers","following_url":"https://api.github.com/users/jvasileff/following{/other_user}","gists_url":"https://api.github.com/users/jvasileff/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasileff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasileff/subscriptions","organizations_url":"https://api.github.com/users/jvasileff/orgs","repos_url":"https://api.github.com/users/jvasileff/repos","events_url":"https://api.github.com/users/jvasileff/events{/privacy}","received_events_url":"https://api.github.com/users/jvasileff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/labels/BUG","name":"BUG","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-29T03:03:52Z","updated_at":"2015-05-29T08:49:12Z","closed_at":null,"body":"With the recent `Tuple` work, I thought I'd finally submit this one that I've had for a while. AFAICT, the first issue below (2k iterations) has already been fixed.\r\n\r\n```ceylon\r\nshared void stackOverflowIsSequence() {\r\n    variable [Integer*] seq = [];\r\n    for (i in 0:5k) {\r\n        seq = seq.withTrailing(i);\r\n    }\r\n    // seq is a giant tuple\r\n    if (is [Integer*] s = (seq of Anything)) {}\r\n\r\n    /*\r\n        With 2k iterations:\r\n\r\n        java.lang.RuntimeException: undecidable canonicalization\r\n        at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:2170)\r\n        at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:2220)\r\n        at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:2174)\r\n        at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:2220)\r\n        at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:2174)\r\n\r\n        With 5k iterations:\r\n\r\n        Caused by: java.lang.StackOverflowError\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor$Nothing.hashCode(TypeDescriptor.java:458)\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor.unorderedHashCode(TypeDescriptor.java:75)\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor$Union.hashCode(TypeDescriptor.java:556)\r\n        at java.util.Arrays.hashCode(Arrays.java:3140)\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor$Class.hashCode(TypeDescriptor.java:182)\r\n        at java.util.Arrays.hashCode(Arrays.java:3140)\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor$Class.hashCode(TypeDescriptor.java:182)\r\n        at java.util.Arrays.hashCode(Arrays.java:3140)\r\n        at com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor$Class.hashCode(TypeDescriptor.java:182)\r\n        at java.util.Arrays.hashCode(Arrays.java:3140)\r\n    */\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/comments/106747775","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2174#issuecomment-106747775","issue_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2174","id":106747775,"user":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T08:49:12Z","updated_at":"2015-05-29T08:49:12Z","body":"@jvasileff I think this bug is misfiled. I'm guessing it's an issue for the language module runtime."}}