{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/737","labels_url":"https://api.github.com/repos/facebook/flow/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/737/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/737/events","html_url":"https://github.com/facebook/flow/pull/737","id":102509592,"number":737,"title":"Do not report function declarations as unreachable.","user":{"login":"davidmason","id":482026,"avatar_url":"https://avatars.githubusercontent.com/u/482026?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmason","html_url":"https://github.com/davidmason","followers_url":"https://api.github.com/users/davidmason/followers","following_url":"https://api.github.com/users/davidmason/following{/other_user}","gists_url":"https://api.github.com/users/davidmason/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmason/subscriptions","organizations_url":"https://api.github.com/users/davidmason/orgs","repos_url":"https://api.github.com/users/davidmason/repos","events_url":"https://api.github.com/users/davidmason/events{/privacy}","received_events_url":"https://api.github.com/users/davidmason/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/CLA%20Signed","name":"CLA Signed","color":"eeeeee"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-22T06:43:41Z","updated_at":"2015-08-22T14:04:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/flow/pulls/737","html_url":"https://github.com/facebook/flow/pull/737","diff_url":"https://github.com/facebook/flow/pull/737.diff","patch_url":"https://github.com/facebook/flow/pull/737.patch"},"body":"See #125 \r\n\r\nThis should fix the warning for hoisted functions. I'm having some trouble with types for also skipping a warning on variable declarations that have no assignment, so I will deal with that separately.\r\n\r\nThis is my first ever OCaml, and my first ML in a few years, so please let me know how I could have written it better.\r\n\r\nI haven't added any tests yet, I've just been manually running it against a file like this:\r\n\r\n```\r\n/* @flow */\r\n\r\nfunction foo(x, y) {\r\n  \"use strict\";\r\n  return bar(x) + baz(y);\r\n\r\n  // should not generate warning\r\n  function bar (ecks) {\r\n    return x + ecks;\r\n  }\r\n\r\n  // should generate warning\r\n  var baz = function (why) {\r\n    return y + why;\r\n  }\r\n\r\n  // should not generate warning\r\n  var z;\r\n\r\n  // should generate warning\r\n  var w = 'w';\r\n}\r\n\r\nfoo(1, 2);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/133706878","html_url":"https://github.com/facebook/flow/pull/737#issuecomment-133706878","issue_url":"https://api.github.com/repos/facebook/flow/issues/737","id":133706878,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T14:04:48Z","updated_at":"2015-08-22T14:04:48Z","body":"Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!"}}