fix arraykey & num bug
commit4986b7d65b63dab5b17f8b1d00c7def78c2c4268
authorScott Owens <sowens@fb.com>
Mon, 7 Jun 2021 13:57:39 +0000 (7 06:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 7 Jun 2021 13:59:09 +0000 (7 06:59 -0700)
treec5d0c678f4ba787546064e3d17ef043be0e9b222
parentb4db5b0085c40c9211946411a5b84e4c38e942dd
fix arraykey & num bug

Summary: An omission in the recent negation types led sub-typing to conclude that `num` and `arraykey` were disjoint. We fix that, and add in some more simplification in union and intersection around `num` and `arraykey`.

Reviewed By: CatherineGasnier

Differential Revision: D28923786

fbshipit-source-id: 2d2552ef6d3dcfcaca7ace2d14f3c83c6521aca2
hphp/hack/src/typing/typing_intersection.ml
hphp/hack/src/typing/typing_subtype.ml
hphp/hack/src/typing/typing_union.ml
hphp/hack/test/typecheck/refinements/neg_num_arraykey.php [new file with mode: 0644]
hphp/hack/test/typecheck/refinements/neg_num_arraykey.php.exp [new file with mode: 0644]