Add substitutions while localizing wildcard type params
commit252c22ba76e849be0980c49d1d475f5406257b3f
authorKunal Mehta <kunalm@fb.com>
Thu, 19 Jul 2018 23:12:04 +0000 (19 16:12 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 19 Jul 2018 23:20:29 +0000 (19 16:20 -0700)
tree390fa8cb93f9d659c92674050f4925a1455232ac
parentb2cf752550c913a6e775abf574cae260d7c4db8b
Add substitutions while localizing wildcard type params

Summary: Type parameters can be constrained on each other. This means that, when we create fresh type parameters when localizing wildcards, we must add a substitution from the original name to the new type.

Reviewed By: oulgen

Differential Revision: D8904982

fbshipit-source-id: d536e33d321adf2e12d7269fa7783cada40c60f1
hphp/hack/src/typing/typing_phase.ml
hphp/hack/test/typecheck/is_expression/class5.php [new file with mode: 0644]
hphp/hack/test/typecheck/is_expression/class5.php.exp [new file with mode: 0644]