{"action":"created","issue":{"url":"https://api.github.com/repos/NumberFour/n4js/issues/13","repository_url":"https://api.github.com/repos/NumberFour/n4js","labels_url":"https://api.github.com/repos/NumberFour/n4js/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/NumberFour/n4js/issues/13/comments","events_url":"https://api.github.com/repos/NumberFour/n4js/issues/13/events","html_url":"https://github.com/NumberFour/n4js/issues/13","id":141261900,"number":13,"title":"Intersection allowed to contain more than one class and Any","user":{"login":"NumberFourAG","id":783965,"avatar_url":"https://avatars.githubusercontent.com/u/783965?v=3","gravatar_id":"","url":"https://api.github.com/users/NumberFourAG","html_url":"https://github.com/NumberFourAG","followers_url":"https://api.github.com/users/NumberFourAG/followers","following_url":"https://api.github.com/users/NumberFourAG/following{/other_user}","gists_url":"https://api.github.com/users/NumberFourAG/gists{/gist_id}","starred_url":"https://api.github.com/users/NumberFourAG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NumberFourAG/subscriptions","organizations_url":"https://api.github.com/users/NumberFourAG/orgs","repos_url":"https://api.github.com/users/NumberFourAG/repos","events_url":"https://api.github.com/users/NumberFourAG/events{/privacy}","received_events_url":"https://api.github.com/users/NumberFourAG/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NumberFour/n4js/labels/bug","name":"bug","color":"ffcccc"},{"url":"https://api.github.com/repos/NumberFour/n4js/labels/prio-low","name":"prio-low","color":"009800"},{"url":"https://api.github.com/repos/NumberFour/n4js/labels/Registered","name":"Registered","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-16T12:44:25Z","updated_at":"2016-04-07T10:43:08Z","closed_at":null,"body":"IDEBUG-231\n Possibly a child item for [IDE-385|https://jira.numberfour.eu/browse/IDE-385]\n\nCurrently, intersection type violate Constraints 23.1 (any may not be contained in intersection) and 23.3 (intersection may contain only one class).\n\n```\nclass A{}\nclass B{}\n\n// Constraints 23.1 XPECT FIXME errors --> \"Any must not be an element of intersection type\" at \"{any,A}\"\nvar intersection{any,A} b;\n\n// Constraints 23.3 XPECT FIXME errors --> \"Only one class may be contained in the intersection type\" at \"{A,B}\"\nvar intersection{A,B} a;\n\n```"},"comment":{"url":"https://api.github.com/repos/NumberFour/n4js/issues/comments/206805400","html_url":"https://github.com/NumberFour/n4js/issues/13#issuecomment-206805400","issue_url":"https://api.github.com/repos/NumberFour/n4js/issues/13","id":206805400,"user":{"login":"mor-n4","id":7124687,"avatar_url":"https://avatars.githubusercontent.com/u/7124687?v=3","gravatar_id":"","url":"https://api.github.com/users/mor-n4","html_url":"https://github.com/mor-n4","followers_url":"https://api.github.com/users/mor-n4/followers","following_url":"https://api.github.com/users/mor-n4/following{/other_user}","gists_url":"https://api.github.com/users/mor-n4/gists{/gist_id}","starred_url":"https://api.github.com/users/mor-n4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mor-n4/subscriptions","organizations_url":"https://api.github.com/users/mor-n4/orgs","repos_url":"https://api.github.com/users/mor-n4/repos","events_url":"https://api.github.com/users/mor-n4/events{/privacy}","received_events_url":"https://api.github.com/users/mor-n4/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T10:43:08Z","updated_at":"2016-04-07T10:43:08Z","body":"As another consideration: if all \"empty\" intersection types are to be delcared illegal, then we would have to check much more than just class vs. interface or final vs. non-final. Consider:\r\n```javascript\r\nclass ~A {\r\n\tpublic prop: string;\r\n}\r\ninterface B {\r\n\tpublic prop: string;\r\n}\r\nclass C {\r\n\tpublic prop: number;\r\n}\r\n\r\nvar test1: intersection{A,C}\r\nvar test2: intersection{B,C}\r\n```"}}