Unban reification of dynamic and functions
commit51431335d2ece7eabb6961f49ad7e4cfd351d40b
authorKunal Mehta <kunalm@fb.com>
Wed, 17 Jul 2019 07:12:55 +0000 (17 00:12 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 17 Jul 2019 07:16:39 +0000 (17 00:16 -0700)
treea23ce68fc66ffa410d93e35871edd6800e11eabd
parent2288d40862bc6286d95f280873ecaddfce0c67e1
Unban reification of dynamic and functions

Summary:
Recent changes to the runtime have allowed us to unban these types:
- `dynamic` now reifies differently from `mixed`
- Reification behavior and optimizations were implemented for functions.

We must still ban functions with variadic args for now, since that is not reflected in the type structure. I'm investigating the viability of banning the `...` syntax in Hack, so that function typehints must have a typehint for their variadic arg. That will make implementation of variadic args in type structures simpler.

Reviewed By: vassilmladenov

Differential Revision: D16229007

fbshipit-source-id: cc02c443b08704de5fa83fbbf2b2d5e80ffb59d3
hphp/hack/src/typing/tast_check/reified_check.ml
hphp/hack/test/typecheck/like_types/dynamic_coercion/decl_types/tapply_class.php.exp
hphp/hack/test/typecheck/like_types/dynamic_coercion/like_decl_types/tapply_class.php.exp
hphp/hack/test/typecheck/like_types/pessimization/decl_types/tapply_class.php.exp
hphp/hack/test/typecheck/reified_generics/newable_targ_basic.php.exp
hphp/hack/test/typecheck/reified_generics/valid_targ_dynamic.php.exp
hphp/hack/test/typecheck/reified_generics/valid_targ_fun.php
hphp/hack/test/typecheck/reified_generics/valid_targ_fun.php.exp