File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
tests/PHPStan/Rules/Functions Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1950,6 +1950,15 @@ public function testBug12051(): void
19501950 $ this ->analyse ([__DIR__ . '/data/bug-12051.php ' ], []);
19511951 }
19521952
1953+ public function testBug8046 (): void
1954+ {
1955+ if (PHP_VERSION_ID < 80100 ) {
1956+ $ this ->markTestSkipped ('Test requires PHP 8.1. ' );
1957+ }
1958+
1959+ $ this ->analyse ([__DIR__ . '/data/bug-8046.php ' ], []);
1960+ }
1961+
19531962 public function testBug11418 (): void
19541963 {
19551964 if (PHP_VERSION_ID < 80100 ) {
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace Bug8046 ;
4+
5+ function add (int $ a , int $ b ): int {
6+ return $ a + $ b ;
7+ }
8+
9+ $ args = ['a ' => 7 ];
10+
11+ var_dump (add (...$ args , b: 8 ));
You can’t perform that action at this time.
0 commit comments