{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1422","labels_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1422/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1422/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1422/events","html_url":"https://github.com/ceylon/ceylon-spec/issues/1422","id":106358624,"number":1422,"title":"Exception when using a union type in type constraint","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":[{"url":"https://api.github.com/repos/ceylon/ceylon-spec/labels/bug","name":"bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":{"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},"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/milestones/11","html_url":"https://github.com/ceylon/ceylon-spec/milestones/1.2","labels_url":"https://api.github.com/repos/ceylon/ceylon-spec/milestones/11/labels","id":798020,"number":11,"title":"1.2","description":"Serialization.","creator":{"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},"open_issues":17,"closed_issues":223,"state":"open","created_at":"2014-09-22T09:55:40Z","updated_at":"2015-09-17T08:22:23Z","due_on":"2014-10-28T23:00:00Z","closed_at":null},"comments":2,"created_at":"2015-09-14T14:48:08Z","updated_at":"2015-09-17T08:22:51Z","closed_at":"2015-09-17T08:22:23Z","body":"Using a union type in a type constraint causes an exception in the type checker. For example\r\n\r\n    shared formal Sequential<FunctionModel<Type, Arguments>|ValueModel<Type>> getDeclaredConstructors\r\n            <Arguments=Nothing>\r\n            (ClosedType<Annotation>* annotationTypes)\r\n                given Arguments satisfies Anything[]?\r\n\r\nPrints \r\n\r\nerror: the 'SupertypeVisitor' caused an exception visiting a 'TypeConstraint' node: '\"java.lang.RuntimeException: getSupertypes() not defined for union types or Nothing\"' at 'com.redhat.ceylon.model.typechecker.model.Type.getSupertypes(Type.java:1370)'\r\n[ceylon-compile]                 given Arguments satisfies Anything[]?;\r\n\r\n\r\nIn addition to the (expected, but disappointing):\r\n\r\nerror: upper bound must be a class, interface, or type parameter\r\n[ceylon-compile]                 given Arguments satisfies Anything[]?;\r\n[ceylon-compile]                                           ^\r\n"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/comments/141001363","html_url":"https://github.com/ceylon/ceylon-spec/issues/1422#issuecomment-141001363","issue_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1422","id":141001363,"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-09-17T08:22:51Z","updated_at":"2015-09-17T08:22:51Z","body":"Fixed. Thanks."}}