New inference: narrow bounds for array update
commitc06af8fcd0534af527d62ee99573a19767316365
authorAndrew Kennedy <akenn@fb.com>
Tue, 23 Apr 2019 15:36:32 +0000 (23 08:36 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 23 Apr 2019 15:59:58 +0000 (23 08:59 -0700)
treeae307b5389c2be7156ba01c34716858a6e07835a
parent2b3e4332ce03b525173cede73efa7160e62e5a14
New inference: narrow bounds for array update

Summary:
Continue improvement of array operations by narrowing the type for array update operations, just as we did already for access and append.

Note: no treatment yet of shape types. This might be addressed in a future diff.

Reviewed By: CatherineGasnier

Differential Revision: D15044664

fbshipit-source-id: 520a45e2db3d3b3bda9ed0e00e8cddf864fc0542
12 files changed:
hphp/hack/src/typing/typing_array_access.ml
hphp/hack/test/typecheck/aktuple/local_vs_nested.php
hphp/hack/test/typecheck/aktuple/local_vs_nested.php.exp
hphp/hack/test/typecheck/aktuple/local_vs_nested.php.legacy.exp
hphp/hack/test/typecheck/aktuple/nested_dynamic_index_lvalue.php
hphp/hack/test/typecheck/aktuple/nested_dynamic_index_lvalue.php.exp
hphp/hack/test/typecheck/aktuple/nested_dynamic_index_lvalue.php.legacy.exp
hphp/hack/test/typecheck/new_inference/empty_map_update.php [new file with mode: 0644]
hphp/hack/test/typecheck/new_inference/empty_map_update.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/union/map_corner_case.php
hphp/hack/test/typecheck/union/map_corner_case.php.exp
hphp/hack/test/typecheck/union/map_corner_case.php.legacy.exp