Stack overflow with cyclic bounds
commit886c736874167bb6485d76bb20afb9610e9f5918
authorAndrew Kennedy <akenn@fb.com>
Tue, 24 May 2022 17:10:58 +0000 (24 10:10 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 24 May 2022 17:10:58 +0000 (24 10:10 -0700)
tree48f059598d8c5d43d18dca91e17157be4e8fa08c
parent016701b2e1f2c04073dc6bbf9b39eabbc5eaea7d
Stack overflow with cyclic bounds

Summary: The `Typing_dependent_type.make` function fails to terminate (in fact, overflows the stack) when there is a cycle in type parameter bounds through a union type. This shows up in Sound Dynamic with like types (see new test).

Differential Revision: D36629104

fbshipit-source-id: 381c13717de5c1690e46046d515be5b68df25e0f
hphp/hack/src/typing/typing_dependent_type.ml
hphp/hack/test/sound_dynamic/typing/loop_bug.good.php [new file with mode: 0644]
hphp/hack/test/sound_dynamic/typing/loop_bug.good.php.exp [new file with mode: 0644]