Check return statements
commit88435507363df69d7d7f60fb3bd5625f95658753
authorJames Wu <jjwu@fb.com>
Thu, 11 Feb 2021 18:24:48 +0000 (11 10:24 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 Feb 2021 18:30:14 +0000 (11 10:30 -0800)
tree8ee23689c80dd8dc2c8f06b7e5d2cb6cb065f495
parent94f3df345afac32d5bc4a279709e7bb5baf7660c
Check return statements

Summary: Check that a return statement returns a subtype of the return type for readonly

Reviewed By: zilberstein

Differential Revision: D26361725

fbshipit-source-id: 12e48cd650c4b51ed9638853c094bb7a2cd93cc8
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/typing/tast_check/readonly_check.ml
hphp/hack/test/typecheck/readonly/return.php [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/return.php.exp [new file with mode: 0644]