Use union instead of unification when type-checking ternary if-expressions
commit2364a9868f1aaa403d5d695213ff72eff213536e
authorSasha Manzyuk <manzyuk@fb.com>
Mon, 25 Jun 2018 10:28:29 +0000 (25 03:28 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 25 Jun 2018 10:42:21 +0000 (25 03:42 -0700)
tree0771c2017cebf0c46bc1f65d5477f59b0212fe11
parente321332c103dc7f3b916297a8d02bfedb8ca9256
Use union instead of unification when type-checking ternary if-expressions

Summary: We use union instead of unification now when type-checking if-statements but we still use unification when type-checking ternary if-expressions.  This diff fixes this discrepancy.

Reviewed By: kmeht

Differential Revision: D8562263

fbshipit-source-id: 161ce533499d67630ef6aa6fbd00a1c5edec44f1
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_lenv.ml
hphp/hack/test/typecheck/gen9.php.exp