Dynamic parameters upcasting
commit1cb6cccfa0ffa917990fd03843961cb9ed92d901
authorVassil Mladenov <vmladenov@fb.com>
Fri, 25 Feb 2022 20:50:49 +0000 (25 12:50 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 25 Feb 2022 20:50:49 +0000 (25 12:50 -0800)
tree7033ff9bf79d9e4d5120c87232ebb84db803e613
parente96609d09e88b958e8c8a3d65e8e9d46b901dc6d
Dynamic parameters upcasting

Summary:
Pessimise existing uses of `dynamic` in parameter types to `supportdyn<mixed>`, so that callers successfully type check under dynamic non-aware subtyping, but with a prologue `$param = $param upcast dynamic` so that the body will type check assuming type `dynamic` for the parameter.

Also remove requirement for enabling unstable features on `upcast` if `enable_sound_dynamic_type` is set.

Reviewed By: francesco-zappa-nardelli

Differential Revision: D34471115

fbshipit-source-id: 59e1ef2094e33cc95b1c380e6aacb8366130db3c
hphp/hack/src/parser/rust_parser_errors.rs
hphp/hack/test/typecheck/typehole/T66877962.php.pess_exp [deleted file]
hphp/hack/test/typecheck/upcast_experimental.php.pess_exp [new file with mode: 0644]