{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/1953","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/1953/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/1953/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/1953/events","html_url":"https://github.com/facebook/prepack/issues/1953","id":322738516,"number":1953,"title":"stmtCompletion invariant during evaluation","user":{"login":"trueadm","id":1519870,"avatar_url":"https://avatars0.githubusercontent.com/u/1519870?v=4","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"labels":[{"id":279345225,"url":"https://api.github.com/repos/facebook/prepack/labels/bug","name":"bug","color":"fc2929","default":true},{"id":601068513,"url":"https://api.github.com/repos/facebook/prepack/labels/priority:%20high","name":"priority: high","color":"b60205","default":false},{"id":690469568,"url":"https://api.github.com/repos/facebook/prepack/labels/react%20compiler","name":"react compiler","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"hermanventer","id":4325251,"avatar_url":"https://avatars2.githubusercontent.com/u/4325251?v=4","gravatar_id":"","url":"https://api.github.com/users/hermanventer","html_url":"https://github.com/hermanventer","followers_url":"https://api.github.com/users/hermanventer/followers","following_url":"https://api.github.com/users/hermanventer/following{/other_user}","gists_url":"https://api.github.com/users/hermanventer/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanventer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanventer/subscriptions","organizations_url":"https://api.github.com/users/hermanventer/orgs","repos_url":"https://api.github.com/users/hermanventer/repos","events_url":"https://api.github.com/users/hermanventer/events{/privacy}","received_events_url":"https://api.github.com/users/hermanventer/received_events","type":"User","site_admin":false},"assignees":[{"login":"hermanventer","id":4325251,"avatar_url":"https://avatars2.githubusercontent.com/u/4325251?v=4","gravatar_id":"","url":"https://api.github.com/users/hermanventer","html_url":"https://github.com/hermanventer","followers_url":"https://api.github.com/users/hermanventer/followers","following_url":"https://api.github.com/users/hermanventer/following{/other_user}","gists_url":"https://api.github.com/users/hermanventer/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanventer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanventer/subscriptions","organizations_url":"https://api.github.com/users/hermanventer/orgs","repos_url":"https://api.github.com/users/hermanventer/repos","events_url":"https://api.github.com/users/hermanventer/events{/privacy}","received_events_url":"https://api.github.com/users/hermanventer/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-14T09:29:55Z","updated_at":"2018-05-14T14:16:58Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"An `invariant` gets triggered when running the below test case at:\r\n\r\nhttps://github.com/facebook/prepack/blob/master/src/evaluators/IfStatement.js#L117\r\n\r\nGiven this test case:\r\n\r\n```js\r\nfunction foo(x, y) {\r\n  var _ref2, _ref3, _ref4, _ref5, _ref6;\r\n  var _props = x;\r\n  var feedback = _props.feedback;\r\n  var config = _props.config;\r\n  var _state = y;\r\n  var foo =\r\n    _state.foo;\r\n\r\n  if (!config || !config.yar) {\r\n    return null;\r\n  }\r\n\r\n  var actorID =\r\n    (_ref2 = feedback) != null\r\n      ? (_ref2 = _ref2.viewer_current_actor) != null\r\n        ? _ref2.id\r\n        : _ref2\r\n      : _ref2;\r\n  var bar =\r\n    (_ref3 = config) != null\r\n      ? _ref3.bar\r\n      : _ref3;\r\n\r\n  if (bar && !foo) {\r\n    return 456;\r\n  }\r\n\r\n  return 123;\r\n}\r\n\r\nthis.__optimize && __optimize(foo);\r\n\r\ninspect = function() {\r\n  return foo({feedback: {viewer_current_actor: {id: 1}}}, {foo: {bar: 10}});\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/prepack/issues/comments/388832954","html_url":"https://github.com/facebook/prepack/issues/1953#issuecomment-388832954","issue_url":"https://api.github.com/repos/facebook/prepack/issues/1953","id":388832954,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars0.githubusercontent.com/u/810438?v=4","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T14:16:58Z","updated_at":"2018-05-14T14:16:58Z","author_association":"MEMBER","body":"https://github.com/facebook/prepack/pull/1954"}}
{"actor":{"display_login":"gaearon"}}