Skip to content

Commit 68e6c97

Browse files
committed
Add another regression test
1 parent 63aad53 commit 68e6c97

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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));

0 commit comments

Comments
 (0)