Fix INCORRECT_TYPE casts to properly set the like context when analyzing the target...
commitad7c93fc0fb691313483029281f9510e43a8dabf
authorVassil Mladenov <vmladenov@fb.com>
Wed, 12 Feb 2020 00:28:40 +0000 (11 16:28 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 12 Feb 2020 00:30:47 +0000 (11 16:30 -0800)
tree419fe65c4cd1911b1b3a9775460f752d9c22cfae
parente83df8c4284f1161a0c412ac0c5ae7f9607057d8
Fix INCORRECT_TYPE casts to properly set the like context when analyzing the target type and allow newtypes for like cast

Reviewed By: dlreeves

Differential Revision: D19842998

fbshipit-source-id: 7a675028e9a5c5e86a9d6831b7c0c70487537cd6
hphp/hack/src/typing/tast_check/enforceable_hint_check.ml
hphp/hack/test/typecheck/like_types/incorrect_type.php.exp
hphp/hack/test/typecheck/like_types/like_casts_cross.php [new file with mode: 0644]
hphp/hack/test/typecheck/like_types/like_casts_cross.php.exp [new file with mode: 0644]