{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2354","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2354/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2354/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2354/events","html_url":"https://github.com/facebook/flow/issues/2354","id":173640762,"number":2354,"title":"\"expected `T` to occur only covariantly\" and (x: {t: T}) => void","user":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-28T10:59:31Z","updated_at":"2016-08-28T13:20:45Z","closed_at":null,"body":"Not sure if I misunderstand something or there is a bug.\r\n\r\n```js\r\n/* @flow */\r\n\r\nclass A<+T> {\r\n  foo(cb: (x: T) => void): void {} // this works\r\n  bar(cb: (x: {t: T}) => void): void {} // this doesn't work\r\n}\r\n```\r\n\r\n```\r\nbar(cb: (x: {t: T}) => void): void {}\r\n                ^ T. invariant position (expected `T` to occur only covariantly)\r\n```\r\n\r\nExample in [\"Try Flow\"](https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjGBDAzrsAQQB4BqAFQD4wBvVMMKOOACgwCMAuMFgD2-IBKMAF5qANzgBLACaDuk2bQC+9MO2wAnNlx79aAFwHLhYsIrkLpMlamVA)"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/242974522","html_url":"https://github.com/facebook/flow/issues/2354#issuecomment-242974522","issue_url":"https://api.github.com/repos/facebook/flow/issues/2354","id":242974522,"user":{"login":"vkurchatkin","id":2993861,"avatar_url":"https://avatars.githubusercontent.com/u/2993861?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurchatkin","html_url":"https://github.com/vkurchatkin","followers_url":"https://api.github.com/users/vkurchatkin/followers","following_url":"https://api.github.com/users/vkurchatkin/following{/other_user}","gists_url":"https://api.github.com/users/vkurchatkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurchatkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurchatkin/subscriptions","organizations_url":"https://api.github.com/users/vkurchatkin/orgs","repos_url":"https://api.github.com/users/vkurchatkin/repos","events_url":"https://api.github.com/users/vkurchatkin/events{/privacy}","received_events_url":"https://api.github.com/users/vkurchatkin/received_events","type":"User","site_admin":false},"created_at":"2016-08-28T13:20:45Z","updated_at":"2016-08-28T13:20:45Z","body":"This definition is unsafe on it's own:\r\n\r\n```js\r\ntype Obj<+T> = {t: T} \r\n```\r\n\r\nAnd, as you [can see](https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVATApgYxgQwCcsw98BncsAMTjjAG8BfTXA40gysAISLCwAPAC5YAdhiq16zdMICeABxIB5AEYArADwBqACoA+MAF5GwgFxg9TMOhxwx5YWEGX12voSOmGYC2DEsJE8wJgBuVHtHZ3k3TS1pbxcwoA), it doesn't really work\r\n"}}
{"actor":{"display_login":"vkurchatkin"}}