Fix bug in tast check
commit9fb07091783519b41929df2199060397784f7513
authorJames Wu <jjwu@fb.com>
Thu, 10 Dec 2020 23:16:09 +0000 (10 15:16 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 10 Dec 2020 23:18:05 +0000 (10 15:18 -0800)
tree493b040a099088ba2500caf13b6efa8c5932c616
parent5000f537d8f6a1647926e1f4e46c68427d7b276a
Fix bug in tast check

Summary:
Use at_fun_def instead of at_fun, since at_fun hits lambdas as well (whereas we're only expecting to hit function defs here).

Normal IFC succeeds on the code, but the IFC tast check loops forever. This fixes the issue.

Reviewed By: madgen

Differential Revision: D25341373

fbshipit-source-id: 3b16a1457da0cd42c28214b3b77dac86adadddc7
hphp/hack/src/typing/tast_check/ifc_tast_check.ml
hphp/hack/test/typecheck/ifc/ifc_lambda.php [new file with mode: 0644]
hphp/hack/test/typecheck/ifc/ifc_lambda.php.exp [new file with mode: 0644]