Skip to content

Commit ce341b4

Browse files
Add test
1 parent bc181de commit ce341b4

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 Bug13296;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class Foo
8+
{
9+
/**
10+
* @param non-empty-array<Bar> $a
11+
* @param non-empty-array<int> $b
12+
*/
13+
public function test($a, $b)
14+
{
15+
assertType('string', current($a)($b));
16+
}
17+
}
18+
19+
class Bar
20+
{
21+
/** @return string */
22+
public function __invoke($b)
23+
{
24+
return '';
25+
}
26+
}

0 commit comments

Comments
 (0)