Skip to content

Commit 83f1509

Browse files
VincentLangletondrejmirtes
authored andcommitted
Add non regression test
1 parent 958d7a7 commit 83f1509

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Bug3474;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
/**
8+
* @param mixed[] $a
9+
*/
10+
function acceptsArray(array $a) : void{
11+
12+
}
13+
14+
/**
15+
* @param mixed[] $a
16+
*/
17+
function dummy(array $a) : void{
18+
if(!is_array($a["test"])){
19+
throw new \RuntimeException("oops");
20+
}
21+
22+
assertType('array<mixed, mixed>', $a['test']);
23+
assertType('array<mixed, mixed>', $a["test"]);
24+
25+
acceptsArray($a['test']);
26+
}

0 commit comments

Comments
 (0)