Add AAST `Hole` for subtype/coercion error annotation
commit0d06a90be2bcfd36fc76b90eb8993ead8c8c79b2
authorMichael Thomas <mjt@fb.com>
Thu, 18 Mar 2021 14:39:22 +0000 (18 07:39 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 18 Mar 2021 14:41:35 +0000 (18 07:41 -0700)
treeceb1c7b1e5d64df2d2657e771203698d165f8cc2
parent90728fc0440bab18a5c5ff669914035f5f73dbef
Add AAST `Hole` for subtype/coercion error annotation

Summary: Add an additional constructor to the core `expr_` data type to record the actual and expected type of an expression when a subtype or coercion fails. This should only be present in the AST after typing and should be transparent with respect to e.g. zoncolan analyses

Differential Revision: D27007255

fbshipit-source-id: f8311cb1e55684cfc403be7fe42a9e612e26d820
18 files changed:
hphp/hack/src/annotated_ast/aast.ml
hphp/hack/src/decl/direct_decl_smart_constructors.rs
hphp/hack/src/ifc/ifc_utils.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/nast.ml
hphp/hack/src/oxidized/aast_visitor/node_impl_gen.rs
hphp/hack/src/oxidized/aast_visitor/node_mut_impl_gen.rs
hphp/hack/src/oxidized/aast_visitor/visitor.rs
hphp/hack/src/oxidized/aast_visitor/visitor_mut.rs
hphp/hack/src/oxidized/gen/aast.rs
hphp/hack/src/oxidized/impl_gen/aast_impl_gen.rs
hphp/hack/src/oxidized_by_ref/copy_types.txt
hphp/hack/src/oxidized_by_ref/extern_types.txt
hphp/hack/src/oxidized_by_ref/gen/aast.rs
hphp/hack/src/server/serverExtractStandalone.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/tast_check/readonly_check.ml
hphp/hack/src/typing/typing.ml