Refactor Coerce/IsSubtype to both take internal types
commitca454aec9d73b83c651c6e6e27c632892e83ef55
authorAndrew Kennedy <akenn@fb.com>
Thu, 31 Mar 2022 15:16:00 +0000 (31 08:16 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 31 Mar 2022 15:16:00 +0000 (31 08:16 -0700)
tree91739b9bb5e0b984dce3b674d2283bcb7d0edb01
parenta45aa7a5141446addad014f74106c5ede355cfe5
Refactor Coerce/IsSubtype to both take internal types

Summary:
Refactor `Typing_logic.Coerce` to take internal types, to match `Typing_logic.IsSubtype`. Next step is merging these.

There was a probable bug in subtyping, whereby we return `Typing_logic.IsSubtype` as the default proposition even if `subtype_env.coerce` is not `None`.

Differential Revision: D35278676

fbshipit-source-id: c16d4035290b8085bcb2ba015c1f85503e119523
hphp/hack/src/typing/typing_inference_env.ml
hphp/hack/src/typing/typing_logic.ml
hphp/hack/src/typing/typing_logic.mli
hphp/hack/src/typing/typing_print.ml
hphp/hack/src/typing/typing_subtype.ml