Make ty_expr exhaustive on expressions
commit158d32f1b44f377c1ea7303901aa80b1034a6352
authorJames Wu <jjwu@fb.com>
Wed, 3 Mar 2021 05:03:51 +0000 (2 21:03 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 3 Mar 2021 05:09:26 +0000 (2 21:09 -0800)
tree585a507e97299a81be1b56323280a783b1b4e2dc
parent0fba2286e85fe811e6448c04de7b41b20f84f242
Make ty_expr exhaustive on expressions

Summary:
This diff makes ty_expr exhaustive, so that we know we're covering every case of readonlyness on expressions.
It also adds a large number of tests for the cases we were missing before; none of them are really that interesting so I didn't split the diff up, but let me know if there's any you'd like me to split out.

Reviewed By: zilberstein

Differential Revision: D26593993

fbshipit-source-id: 2b5ba67cad0e52116b7f6439ef3471e0f9ad50a1
hphp/hack/src/typing/tast_check/readonly_check.ml
hphp/hack/test/typecheck/readonly/collection_literal.php [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/collection_literal.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/list_assign.php [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/list_assign.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/ternary.php [new file with mode: 0644]
hphp/hack/test/typecheck/readonly/ternary.php.exp [new file with mode: 0644]