opaque types should provide proper constraints on their type params
commit4636777b1ce7739614882a88dacf77bb1b3d01fe
authorCatherine Gasnier <catg@fb.com>
Thu, 13 May 2021 16:25:53 +0000 (13 09:25 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 May 2021 16:26:58 +0000 (13 09:26 -0700)
tree82848b3aef12c9418236474551216849bd10919f
parent5871eaa4f253c4ac76c416e6025e69cc47038ba5
opaque types should provide proper constraints on their type params

Summary: See added test case for an example. This test case use to not have any error.

Reviewed By: andrewjkennedy

Differential Revision: D28380086

fbshipit-source-id: 7a2a519ec6d233b4cdbfbd41be0fb47513d77b12
hphp/hack/src/typing/typing_check_decls.ml
hphp/hack/test/typecheck/constraint_newtype_param.php [new file with mode: 0644]
hphp/hack/test/typecheck/constraint_newtype_param.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/constraints/tapply_is_newtype.php
hphp/hack/test/typecheck/constraints/tapply_is_newtype.php.exp
hphp/hack/test/typecheck/constraints/typedef.php
hphp/hack/test/typecheck/newtype8.php