Split error codes for read/write on array access and object access
commit94c38449779095043a00edf19d7e231cdacff2de
authorVassil Mladenov <vmladenov@fb.com>
Wed, 13 May 2020 05:17:36 +0000 (12 22:17 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 13 May 2020 05:29:00 +0000 (12 22:29 -0700)
tree450cb4041546af51cb3bf5f0d4293b64d45c7623
parentac8c21ff4dd66c94a45dd516051f5e32c7431cc0
Split error codes for read/write on array access and object access

Summary: This diff splits the codes for read and write on certain array access and object access expressions so that the former can be tracked and eliminated. The motivation is that when there's a error on a read that is fixme'd, it generates a Tany (Terr) that flows into other types in a function body.

Reviewed By: Wilfred

Differential Revision: D21421657

fbshipit-source-id: ed89bc6cd81c124f40b84c269109ca76f4e56290
15 files changed:
hphp/hack/src/errors/error_codes.ml
hphp/hack/src/errors/errors.ml
hphp/hack/src/errors/errors.mli
hphp/hack/src/typing/typing_array_access.ml
hphp/hack/src/typing/typing_object_get.ml
hphp/hack/src/typing/typing_taccess.ml
hphp/hack/test/errors/error_map.ml
hphp/hack/test/typecheck/array_heterogeneous.php.exp
hphp/hack/test/typecheck/fake_members11.php.exp
hphp/hack/test/typecheck/invalid_arraykey/darray_assign_bad.php.exp
hphp/hack/test/typecheck/invalid_arraykey/invalid_arraykey.php.exp
hphp/hack/test/typecheck/new_inference/eager_solve/stack_overflow_array.php.exp [copied from hphp/hack/test/typecheck/new_inference/eager_solve/stack_overflow_array.php.like_types.exp with 93% similarity]
hphp/hack/test/typecheck/new_inference/eager_solve/stack_overflow_array.php.like_types.exp
hphp/hack/test/typecheck/test_array13.php.exp
hphp/hack/test/unit/utils/errors_test.ml