Push supportdyn into shapes during subtyping
commitc405d52f10177494ed77f8ce7dfbe30ce7345f40
authorAndrew Kennedy <akenn@meta.com>
Thu, 13 Oct 2022 14:13:14 +0000 (13 07:13 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 Oct 2022 14:13:14 +0000 (13 07:13 -0700)
tree51824119abaf620bcad751b00eeabf8b9a6c52cd
parent655d3563010a67da53bb5482c1ef8161ee0a3534
Push supportdyn into shapes during subtyping

Summary:
When applying subtyping to a type of the form `supportdyn<shape(fields,...)>` we should push `supportdyn` onto the field types. This is particularly important for the implicit `mixed` fields in the open part of the shape.

Implementation involves passing extra flags around `simplify_subtype`.

Differential Revision: D40320345

fbshipit-source-id: 342200f0f4cb3628c666d5fd365fcda3c638cc7d
hphp/hack/src/typing/typing_make_type.ml
hphp/hack/src/typing/typing_subtype.ml
hphp/hack/test/sound_dynamic/typing/shape_union.good.php [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/shape_union.good.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/shape/shape_missing_optional_field_subtyping.php.tgt_pess_disabled [deleted file]
hphp/hack/test/typecheck/shape/shape_unification_missing_optional_fields.php.tgt_pess_disabled [deleted file]