add support for typedefs
commit12aa45f3c4808799c01ff122d0070005c82d9a82
authorNoam Zilberstein <noamz@fb.com>
Thu, 24 Jun 2021 14:33:02 +0000 (24 07:33 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 24 Jun 2021 14:36:45 +0000 (24 07:36 -0700)
tree16188935fa5f8a74b7c529690ec0ab1d70c1cb73
parentd61eaf3300b41a25c5029acc0d3895eb8261338c
add support for typedefs

Summary: This diff allows you to define internal typedefs. It's a bit weird now that we have both internal typedefs and newtypes with slightly different semantics. We'll have to work out how we want this to work long term

Reviewed By: andrewjkennedy

Differential Revision: D29302817

fbshipit-source-id: f85ef48e09e384c4177f636690428db119792cb4
18 files changed:
hphp/hack/src/annotated_ast/aast_defs.ml
hphp/hack/src/decl/decl_nast.ml
hphp/hack/src/decl/direct_decl_smart_constructors.rs
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/gen/aast_defs.rs
hphp/hack/src/oxidized/impl_gen/aast_defs_impl_gen.rs
hphp/hack/src/oxidized_by_ref/decl_visitor/node_impl_gen.rs
hphp/hack/src/oxidized_by_ref/nast_visitor/node_impl_gen.rs
hphp/hack/src/server/serverExtractStandalone.ml
hphp/hack/src/typing/typing_env.ml
hphp/hack/src/typing/typing_kinding.ml
hphp/hack/src/typing/typing_type_wellformedness.ml
hphp/hack/src/typing/typing_visibility.ml
hphp/hack/src/typing/typing_visibility.mli
hphp/hack/src/typing/write_symbol_info/symbol_add_fact.ml
hphp/hack/test/typecheck/modules/module_typedef.php [new file with mode: 0644]
hphp/hack/test/typecheck/modules/module_typedef.php.exp [new file with mode: 0644]