{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2256","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2256/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2256/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2256/events","html_url":"https://github.com/facebook/flow/issues/2256","id":171304581,"number":2256,"title":"Error messages comparing objects","user":{"login":"DanielHeath","id":47430,"avatar_url":"https://avatars.githubusercontent.com/u/47430?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielHeath","html_url":"https://github.com/DanielHeath","followers_url":"https://api.github.com/users/DanielHeath/followers","following_url":"https://api.github.com/users/DanielHeath/following{/other_user}","gists_url":"https://api.github.com/users/DanielHeath/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielHeath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielHeath/subscriptions","organizations_url":"https://api.github.com/users/DanielHeath/orgs","repos_url":"https://api.github.com/users/DanielHeath/repos","events_url":"https://api.github.com/users/DanielHeath/events{/privacy}","received_events_url":"https://api.github.com/users/DanielHeath/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/error%20messages","name":"error messages","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-16T02:01:22Z","updated_at":"2016-08-18T16:48:55Z","closed_at":null,"body":"I'm trying to typecheck some react-redux code (using the flow-typed repo definitions).\r\n\r\nSomehow the props aren't lining up correctly (I'm fairly sure that's my mistake.\r\n\r\nHowever, the resulting error message is:\r\n```\r\n102: const Foo: Class<React.Component<*, BaseProps, *>> = connect(mapStateToProps, mapDispatchToProps)(SignInFormContainer);\r\n                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `P` of function call. This type is incompatible with\r\n102: const Foo: Class<React.Component<*, BaseProps, *>> = connect(mapStateToProps, mapDispatchToProps)(SignInFormContainer);\r\n                                         ^^^^^^^^^ object type\r\n```\r\n\r\nwhich gives no information about *how* those types are incompatible, or what `P` has been inferred as in this case. \r\nWorse yet, `connect` has an intersection type across a number of definitions, and most of them have a type parameter named `P` (no indication which one has been used)."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/240784900","html_url":"https://github.com/facebook/flow/issues/2256#issuecomment-240784900","issue_url":"https://api.github.com/repos/facebook/flow/issues/2256","id":240784900,"user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars.githubusercontent.com/u/952783?v=3","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T16:48:55Z","updated_at":"2016-08-18T16:48:55Z","body":"Sorry about that @DanielHeath, that error message definitely sucks.\r\n\r\nI've run into a handful of those. I debug them in similar fashion I do with Babel issues. Basically create a new branch and slowly chunk away at the irrelevant bits until all you're left with is a tiny reproduction case which you can then think about abstractly and should be much easier to fix.\r\n\r\nIf you want to share the reduced case with us it would be helpful for improving error messages for everyone in the future."}}
{"actor":{"display_login":"thejameskyle"}}