Add `Hole` to ill-typed return expression
commitcba4d1363eb20dd22ec52fdd2775683a3e361ee9
authorMichael Thomas <mjt@fb.com>
Fri, 9 Apr 2021 15:37:59 +0000 (9 08:37 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 9 Apr 2021 15:39:30 +0000 (9 08:39 -0700)
treee235c647afb6ffb6d4170bfeeb15a86201ff2b97
parent8be4ac64051a34ab614163ca342b14d8224c318b
Add `Hole` to ill-typed return expression

Summary: This diff extends the application of `Hole`s to return expression, indicating the expected and actual types of the expression.

Reviewed By: madgen

Differential Revision: D27363689

fbshipit-source-id: 7336718c88a110d1f0545eb3f8594e2a5c66cbdb
18 files changed:
hphp/hack/src/typing/tast_check/rvalue_check.ml
hphp/hack/src/typing/typing.ml
hphp/hack/test/holes/return_async.php [new file with mode: 0644]
hphp/hack/test/holes/return_async.php.holes.exp [new file with mode: 0644]
hphp/hack/test/holes/return_awaitable_void.php [new file with mode: 0644]
hphp/hack/test/holes/return_awaitable_void.php.holes.exp [new file with mode: 0644]
hphp/hack/test/holes/return_literal.php [new file with mode: 0644]
hphp/hack/test/holes/return_literal.php.holes.exp [new file with mode: 0644]
hphp/hack/test/holes/return_refinement.php [new file with mode: 0644]
hphp/hack/test/holes/return_refinement.php.holes.exp [new file with mode: 0644]
hphp/hack/test/holes/return_sync.php [new file with mode: 0644]
hphp/hack/test/holes/return_sync.php.holes.exp [new file with mode: 0644]
hphp/hack/test/integration_ml/coverage/test_coverage_levels_multi.ml
hphp/hack/test/integration_ml/coverage/test_coverage_levels_partial.ml
hphp/hack/test/tast/construct_unknown_class.php.exp
hphp/hack/test/typecheck/fun_no_ret.php.exp
hphp/hack/test/typecheck/new_inference/tparam_constraints2.php.exp
hphp/hack/test/typecheck/nonnull/void_is_not_subtype_of_nonnull.php.exp