Account for async when poisoning the hierarchy
commitf2556aecc08011fb33b923f3e2cff35d56e47984
authorAndrew Kennedy <akenn@fb.com>
Fri, 15 Jul 2022 15:35:03 +0000 (15 08:35 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 15 Jul 2022 15:35:03 +0000 (15 08:35 -0700)
tree257f455cb77b2e9cb12d6aa0c20ccc59f8ea483f
parent99b15aaf8504e5889b3760464e7afd6c35143d09
Account for async when poisoning the hierarchy

Summary: The type `Awaitable<int>` is enforced for returns on `async` functions but not for non-async ones. When poisoning the hierarchy, we failed to account for this. See new test case for an example.

Reviewed By: vassilmladenov

Differential Revision: D37884252

fbshipit-source-id: 7436cc4a88dd4b266fcf3ed495f02c620f5b5e4c
hphp/hack/src/typing/typing_extends.ml