Teach the typechecker to understand Map appends
commita1b1baa9cd1346805a9e9a24dbd718bfa417dad9
authorGabe Levi <glevi@fb.com>
Mon, 31 Mar 2014 15:45:58 +0000 (31 08:45 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 2 Apr 2014 16:14:01 +0000 (2 09:14 -0700)
treed6d08fc586be1f7046e519c4826e8f09e8eb6dc0
parent0b3a11fefdccc94baea921ba273fc997a77bc522
Teach the typechecker to understand Map appends

You can do `$map[] = Pair {$key, $value}`. It's pretty easy for the
typechecker to understand, so unless we're removing this functionality from
hhvm then we might as well support it.

This fixes #2253

Reviewed By: @jwatzman

Differential Revision: D1248858
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_compare.ml
hphp/hack/src/typing/typing_reason.ml
hphp/hack/test/more_tests/map_append1.php [new file with mode: 0644]
hphp/hack/test/more_tests/map_append1.php.exp [new file with mode: 0644]
hphp/hack/test/more_tests/map_append_bad1.php [new file with mode: 0644]
hphp/hack/test/more_tests/map_append_bad1.php.exp [new file with mode: 0644]
hphp/hack/test/more_tests/map_append_bad2.php [new file with mode: 0644]
hphp/hack/test/more_tests/map_append_bad2.php.exp [new file with mode: 0644]
hphp/hack/test/more_tests/map_array_append2.php [deleted file]
hphp/hack/test/more_tests/map_array_append2.php.exp [deleted file]