Store tcopt in Tast.EnvAnnotation.t
commit3ff40a3d0acc509b69bf2802c27317b4ed17b5aa
authorJake Bailey <jakebailey@fb.com>
Fri, 12 Jan 2018 21:42:22 +0000 (12 13:42 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 16 Jan 2018 16:41:35 +0000 (16 08:41 -0800)
tree0ec00a559c740eb176107e4bf073c06cc7de3cca
parent02c8c1fb19bb18588eca9dc8292a1049fee28863
Store tcopt in Tast.EnvAnnotation.t

Summary:
Currently, consumers of a Typed AST need to construct a Typing_env to make use of the TAST's EnvAnnotation. This means they must provide TypecheckerOptions, but there is no guarantee that the provided options are the same options used during typechecking.

To simplify the consumption of Typed ASTs, and to ensure that there is no mismatch between the options used during construction of the Typed AST and the later consumption of it, this change adds a tcopt field to the TAST's EnvAnnotation.

Reviewed By: andrewjkennedy

Differential Revision: D6595246

fbshipit-source-id: 5dccd608d449f51b18319ab38e9d25e4ab2d7549
hphp/hack/src/typing/tast.ml
hphp/hack/src/typing/tast_expand.ml
hphp/hack/src/typing/typing.ml