{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1328","labels_url":"https://api.github.com/repos/facebook/flow/issues/1328/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1328/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1328/events","html_url":"https://github.com/facebook/flow/issues/1328","id":129540884,"number":1328,"title":"Generics superclass check don't work","user":{"login":"vaukalak","id":1864367,"avatar_url":"https://avatars.githubusercontent.com/u/1864367?v=3","gravatar_id":"","url":"https://api.github.com/users/vaukalak","html_url":"https://github.com/vaukalak","followers_url":"https://api.github.com/users/vaukalak/followers","following_url":"https://api.github.com/users/vaukalak/following{/other_user}","gists_url":"https://api.github.com/users/vaukalak/gists{/gist_id}","starred_url":"https://api.github.com/users/vaukalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaukalak/subscriptions","organizations_url":"https://api.github.com/users/vaukalak/orgs","repos_url":"https://api.github.com/users/vaukalak/repos","events_url":"https://api.github.com/users/vaukalak/events{/privacy}","received_events_url":"https://api.github.com/users/vaukalak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-28T18:46:16Z","updated_at":"2016-01-28T18:46:16Z","closed_at":null,"body":"Suppose a code like this:\r\n```\r\n/* @flow */\r\nclass A {\r\n    someField : string;\r\n}\r\n\r\nclass B<T : A> {\r\n    arr : Array<T>;\r\n}\r\n\r\nfunction foo(b : B) : void {\r\n    b.arr.push(1);\r\n}\r\n```\r\n\r\nFlow will find zero errors in it. Anyway if I change to\r\n```\r\nfunction foo(b : B<A>) : void\r\n```\r\nit will throw exception, as expected. The issue here, is that `T` should always extend `A`. So `B` should always be considered as `B<A>`, or even better as `B<T : A>`."}}