Skip to content

Commit 74eb447

Browse files
committed
Added regression test
1 parent 58c1752 commit 74eb447

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Bug13039;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
function doFoo() {
8+
/** @var list<array<string, mixed>> */
9+
$transactions = [];
10+
11+
assertType('list<array<string, mixed>>', $transactions);
12+
13+
foreach (array_keys($transactions) as $k) {
14+
$transactions[$k]['Shares'] = [];
15+
$transactions[$k]['Shares']['Projects'] = [];
16+
$transactions[$k]['Shares']['People'] = [];
17+
}
18+
19+
assertType('list<array<string, mixed>>', $transactions);
20+
}
21+

0 commit comments

Comments
 (0)