{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/619","labels_url":"https://api.github.com/repos/facebook/flow/issues/619/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/619/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/619/events","html_url":"https://github.com/facebook/flow/issues/619","id":93919702,"number":619,"title":"Polymorphic types can't be referred to in function body","user":{"login":"AgentME","id":577345,"avatar_url":"https://avatars.githubusercontent.com/u/577345?v=3","gravatar_id":"","url":"https://api.github.com/users/AgentME","html_url":"https://github.com/AgentME","followers_url":"https://api.github.com/users/AgentME/followers","following_url":"https://api.github.com/users/AgentME/following{/other_user}","gists_url":"https://api.github.com/users/AgentME/gists{/gist_id}","starred_url":"https://api.github.com/users/AgentME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgentME/subscriptions","organizations_url":"https://api.github.com/users/AgentME/orgs","repos_url":"https://api.github.com/users/AgentME/repos","events_url":"https://api.github.com/users/AgentME/events{/privacy}","received_events_url":"https://api.github.com/users/AgentME/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T00:20:30Z","updated_at":"2015-07-09T01:16:58Z","closed_at":"2015-07-09T01:16:58Z","body":"Here's something that caught me by surprise:\r\n\r\n```javascript\r\n/* @flow */\r\n\r\nfunction x<T>(a: T) {\r\n  var b: T = a;\r\n}\r\n```\r\n\r\n```\r\n[chris /tmp/a]$ flow check\r\n\r\n/private/tmp/a/bar.js:4:10,10: identifier T\r\nCould not resolve name\r\n\r\nFound 1 error\r\n```\r\n\r\nIf the T annotation isn't there on line 4, it checks fine and it seems like Flow infers that it's of type T anyway."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/119776208","html_url":"https://github.com/facebook/flow/issues/619#issuecomment-119776208","issue_url":"https://api.github.com/repos/facebook/flow/issues/619","id":119776208,"user":{"login":"AgentME","id":577345,"avatar_url":"https://avatars.githubusercontent.com/u/577345?v=3","gravatar_id":"","url":"https://api.github.com/users/AgentME","html_url":"https://github.com/AgentME","followers_url":"https://api.github.com/users/AgentME/followers","following_url":"https://api.github.com/users/AgentME/following{/other_user}","gists_url":"https://api.github.com/users/AgentME/gists{/gist_id}","starred_url":"https://api.github.com/users/AgentME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgentME/subscriptions","organizations_url":"https://api.github.com/users/AgentME/orgs","repos_url":"https://api.github.com/users/AgentME/repos","events_url":"https://api.github.com/users/AgentME/events{/privacy}","received_events_url":"https://api.github.com/users/AgentME/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T01:16:58Z","updated_at":"2015-07-09T01:16:58Z","body":"Oh and this is a direct duplicate of https://github.com/facebook/flow/issues/160. I'll close this."}}