Generate Terr instead of Tobject during invalid refinement
commitd135ed3d80a3b3444e4af2bb9bd297aa6fd8d41c
authorMistral Orhan Jean-Pierre Contrastin <mojpc2@fb.com>
Wed, 11 Aug 2021 10:37:35 +0000 (11 03:37 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 11 Aug 2021 10:38:54 +0000 (11 03:38 -0700)
tree69cbad3eab139dd40be2c9dcb20bea351732434c
parent87aeb4044c2d7e868e9c4614711d5c49f77a7420
Generate Terr instead of Tobject during invalid refinement

Summary:
Upon refining to a non-existent class, we used to generate `Tobject`. This is not sensible as the attempt to refine could have been for a primitive.

We now generate `Terr` instead.

This is part of a series of diffs attempting to eliminate `Tobject` altogether.

Differential Revision: D30158432

fbshipit-source-id: a63267a7aebda96bac6a4a645e7caec34173edee
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/instanceof/instanceof_parent.php.exp
hphp/hack/test/typecheck/instanceof/instanceof_self.php.exp
hphp/hack/test/typecheck/refinements/refine_non_existent.php [new file with mode: 0644]
hphp/hack/test/typecheck/refinements/refine_non_existent.php.exp [new file with mode: 0644]