Strip supportdyn off expected shape type
commit4284fd80dbdd9a6cea77bb8e9aca5cdb65c4790f
authorAndrew Kennedy <akenn@fb.com>
Mon, 29 Aug 2022 19:37:26 +0000 (29 12:37 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 29 Aug 2022 19:37:26 +0000 (29 12:37 -0700)
tree463103814624f95685dee55ee620c81dde4f467d
parent1ee54f05ea3b27b9b9773a50dd7c2e342eeaf929
Strip supportdyn off expected shape type

Summary: For a shape expression, when the expected type is `supportdyn(shape('a' => t, ...))`, first strip off the `supportdyn` so that we can use the shape type to guide the inference of the shape components.

Reviewed By: vassilmladenov

Differential Revision: D39084806

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