Do not use Ast_provider in Reified_check
commitc48c5eec364d202b1cb06468ac48f001589b334c
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Fri, 13 Mar 2020 23:57:34 +0000 (13 16:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 14 Mar 2020 00:08:29 +0000 (13 17:08 -0700)
tree81de5f005c3131b5a84de9abbc35de0bb523a152
parent626c64f79b0309dc29134b6b84374942d44aa8d0
Do not use Ast_provider in Reified_check

Summary:
In {D18700484}, we began using Ast_provider in this TAST check to ban the use of class-level reified generics in static methods. This is an issue for the hh_server rearchitecture--we do not plan to provide TAST checks with an efficient way to fetch ASTs of other files.

I think we can get the same behavior just using Decl_provider, by looking up the static method as instantiated in its class-of-origin. This diff attempts to do so.

Reviewed By: Wilfred

Differential Revision: D20352111

fbshipit-source-id: 8fcaa2159a1c9938fa1b8f861b9d186a8feb03c8
hphp/hack/src/typing/tast_check/reified_check.ml