{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/256","labels_url":"https://api.github.com/repos/facebook/flow/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/256/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/256/events","html_url":"https://github.com/facebook/flow/issues/256","id":57326475,"number":256,"title":"Type checking array with two types fails if the 8th entry is a function","user":{"login":"exi","id":449463,"avatar_url":"https://avatars.githubusercontent.com/u/449463?v=3","gravatar_id":"","url":"https://api.github.com/users/exi","html_url":"https://github.com/exi","followers_url":"https://api.github.com/users/exi/followers","following_url":"https://api.github.com/users/exi/following{/other_user}","gists_url":"https://api.github.com/users/exi/gists{/gist_id}","starred_url":"https://api.github.com/users/exi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exi/subscriptions","organizations_url":"https://api.github.com/users/exi/orgs","repos_url":"https://api.github.com/users/exi/repos","events_url":"https://api.github.com/users/exi/events{/privacy}","received_events_url":"https://api.github.com/users/exi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/feature%20request","name":"feature request","color":"d4c5f9"},{"url":"https://api.github.com/repos/facebook/flow/labels/willfix%20in%20next%20release","name":"willfix in next release","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-11T15:00:41Z","updated_at":"2015-05-15T21:27:15Z","closed_at":null,"body":"Just an example library code:\r\n```\r\ndeclare class Myclass {\r\n    myfun(myarray: Array<Function | string>): any;\r\n}\r\ndeclare var myclass: Myclass;\r\n```\r\nThis code checks out without error:\r\n```javascript\r\nmyclass.myfun([\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", function (ar) {}])\r\n```\r\nThis code produces the error below:\r\n```javascript\r\nmyclass.myfun([\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", function (ar) {}])\r\n```\r\n```\r\n/home/exi/tmp/flow/test/code/test.js:1:16,18: string\r\nThis type is incompatible with\r\n  /home/exi/tmp/flow/test/code/test.js:1:51,66: function\r\n\r\n/home/exi/tmp/flow/test/code/test.js:1:51,66: function\r\nThis type is incompatible with\r\n  /home/exi/tmp/flow/test/code/test.js:1:16,18: string\r\n\r\n/home/exi/tmp/flow/test/lib/lib.js:2:26,33: function type\r\nThis type is incompatible with\r\n  /home/exi/tmp/flow/test/code/test.js:1:16,18: string\r\n\r\nFound 3 errors\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/102529177","html_url":"https://github.com/facebook/flow/issues/256#issuecomment-102529177","issue_url":"https://api.github.com/repos/facebook/flow/issues/256","id":102529177,"user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T21:27:15Z","updated_at":"2015-05-15T21:27:15Z","body":"This issue can be closed."}}