Use expanded type when subtyping unions on right
commitf95c4b9f80a58e61f83be2cd520bc54d840d3168
authorAndrew Kennedy <akenn@fb.com>
Thu, 10 Mar 2022 10:54:00 +0000 (10 02:54 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 10 Mar 2022 10:54:00 +0000 (10 02:54 -0800)
tree207aa091ffa28188611b2aa509f7a226a29bda44
parent03efb5398d7563ea040610b1bd9bafe0fc2d8c79
Use expanded type when subtyping unions on right

Summary: Title says all. In subtyping, when checking `t <: t1 | ... | tn`, we pass the unexpanded `t` to the helper function. This will fail if `t` is a type variable that has already been solved. Test case is for sound dynamic but possibly there are failures not involving dynamic.

Reviewed By: francesco-zappa-nardelli

Differential Revision: D34783006

fbshipit-source-id: f7b897184fc5afcddf64fb52e78d2f3ed44954e7
hphp/hack/src/typing/typing_subtype.ml
hphp/hack/test/sound_dynamic/typing/supportdyn_compare.good.php [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/supportdyn_compare.good.php.exp [new file with mode: 0644]