Check for void/noreturn in conditionals
commit640ce87c0566736918183a4d90cf44822c5f1ba5
authorMike Qian <mqian@fb.com>
Thu, 28 Sep 2017 17:53:12 +0000 (28 10:53 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 28 Sep 2017 18:22:47 +0000 (28 11:22 -0700)
treeec7a3a91686a4d717a40805061ac50614d8125aa
parenta07b1df8f1587b957656ebf175230605a5fe0248
Check for void/noreturn in conditionals

Summary: Add rvalue check when typing the controlling expression in conditional statements.

Reviewed By: jamesjwu

Differential Revision: D5924659

fbshipit-source-id: d10c1b053e6be72a6813f956d122b057b62722f9
hphp/hack/src/typing/typing.ml
hphp/hack/test/typecheck/noreturn_usage_2.php [new file with mode: 0644]
hphp/hack/test/typecheck/noreturn_usage_2.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/noreturn_usage_3.php [new file with mode: 0644]
hphp/hack/test/typecheck/noreturn_usage_3.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_3.php [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_3.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_4.php [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_4.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_5.php [new file with mode: 0644]
hphp/hack/test/typecheck/void_usage_5.php.exp [new file with mode: 0644]