{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/1718","repository_url":"https://api.github.com/repos/ceylon/ceylon","labels_url":"https://api.github.com/repos/ceylon/ceylon/issues/1718/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon/issues/1718/comments","events_url":"https://api.github.com/repos/ceylon/ceylon/issues/1718/events","html_url":"https://github.com/ceylon/ceylon/issues/1718","id":116893385,"number":1718,"title":"crazy case with flatten()","user":{"login":"CeylonMigrationBot","id":6583436,"avatar_url":"https://avatars.githubusercontent.com/u/6583436?v=3","gravatar_id":"","url":"https://api.github.com/users/CeylonMigrationBot","html_url":"https://github.com/CeylonMigrationBot","followers_url":"https://api.github.com/users/CeylonMigrationBot/followers","following_url":"https://api.github.com/users/CeylonMigrationBot/following{/other_user}","gists_url":"https://api.github.com/users/CeylonMigrationBot/gists{/gist_id}","starred_url":"https://api.github.com/users/CeylonMigrationBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeylonMigrationBot/subscriptions","organizations_url":"https://api.github.com/users/CeylonMigrationBot/orgs","repos_url":"https://api.github.com/users/CeylonMigrationBot/repos","events_url":"https://api.github.com/users/CeylonMigrationBot/events{/privacy}","received_events_url":"https://api.github.com/users/CeylonMigrationBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon/labels/m-compiler-java","name":"m-compiler-java","color":"00aa00"},{"url":"https://api.github.com/repos/ceylon/ceylon/labels/s-in%20progress","name":"s-in progress","color":"bdbdbd"},{"url":"https://api.github.com/repos/ceylon/ceylon/labels/t-bug","name":"t-bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"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},"assignees":[{"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}],"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon/milestones/5","html_url":"https://github.com/ceylon/ceylon/milestones/1.3","labels_url":"https://api.github.com/repos/ceylon/ceylon/milestones/5/labels","id":1411356,"number":5,"title":"1.3","description":null,"creator":{"login":"CeylonMigrationBot","id":6583436,"avatar_url":"https://avatars.githubusercontent.com/u/6583436?v=3","gravatar_id":"","url":"https://api.github.com/users/CeylonMigrationBot","html_url":"https://github.com/CeylonMigrationBot","followers_url":"https://api.github.com/users/CeylonMigrationBot/followers","following_url":"https://api.github.com/users/CeylonMigrationBot/following{/other_user}","gists_url":"https://api.github.com/users/CeylonMigrationBot/gists{/gist_id}","starred_url":"https://api.github.com/users/CeylonMigrationBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeylonMigrationBot/subscriptions","organizations_url":"https://api.github.com/users/CeylonMigrationBot/orgs","repos_url":"https://api.github.com/users/CeylonMigrationBot/repos","events_url":"https://api.github.com/users/CeylonMigrationBot/events{/privacy}","received_events_url":"https://api.github.com/users/CeylonMigrationBot/received_events","type":"User","site_admin":false},"open_issues":514,"closed_issues":38,"state":"open","created_at":"2015-11-14T01:13:20Z","updated_at":"2016-07-26T17:00:57Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2014-07-02T23:43:58Z","updated_at":"2016-07-27T21:20:38Z","closed_at":null,"body":"[@gavinking] I have:\r\n\r\n```ceylon\r\nvalue sumref = sum<Integer>;\r\nvalue callable = flatten(sumref);\r\nprint(callable(1,2,3));\r\n```\r\n\r\nThis is rather exotic, but is well-typed. It blows up the backend:\r\n\r\n```\r\nInconvertible types\r\n  required: ceylon.language.Sequential\r\n  found:    ceylon.language.Integer\r\n```\n\n[Migrated from ceylon/ceylon-compiler#1718]"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/comments/235724812","html_url":"https://github.com/ceylon/ceylon/issues/1718#issuecomment-235724812","issue_url":"https://api.github.com/repos/ceylon/ceylon/issues/1718","id":235724812,"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},"created_at":"2016-07-27T21:20:37Z","updated_at":"2016-07-27T21:20:37Z","body":"This works on Dart and JVM 1.20+, but fails to compile on JS with:\r\n\r\n```\r\n$ ceylon compile-js\r\nError: Errors found. Compilation stopped.\r\nError: Errors found. Compilation stopped.\r\nNote: Created module simple/1.0.0\r\nsource/simple/run.ceylon:4: error: the 'GenerateJsVisitor' caused an exception visiting a 'InvocationExpression' node: '\"java.lang.IndexOutOfBoundsException: Index: 0\"' at 'java.util.Collections$EmptyList.get(Collections.java:4454)'\r\n    print(callable(1,2,3));\r\n          ^\r\n1 error\r\nceylon compile-js: There was 1 error.\r\n```"}}
{"actor":{"display_login":"jvasileff"}}