Remove array(...) in typecheck tests that result in test differences
[hiphop-php.git] / hphp / hack / test / typecheck / akempty_promotion_8.php
blob02856792ab3fa575fb5c76170a4ed7de968e6f0e
1 <?hh //strict
3 /**
4 * Test confilicting AKempty promotions - in one branch it's promoted to
5 * AKvarray, in another to AKdarray. Should be unresolved of those two afterwards.
6 */
7 function test(bool $b): void {
8 $a = varray[];
9 if ($b) {
10 $a[] = 'aaa';
11 } else {
12 $a[0] = 'aaa';
14 // error - one of the branches result in a map-like array
15 f($a);
18 function f(array<string> $_): void {}