Skip to content

Commit 958d7a7

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

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,6 +2192,13 @@ public function testBug13065(): void
21922192
$this->analyse([__DIR__ . '/data/bug-13065.php'], $errors);
21932193
}
21942194

2195+
public function testBug3506(): void
2196+
{
2197+
$this->checkExplicitMixed = true;
2198+
$this->checkImplicitMixed = true;
2199+
$this->analyse([__DIR__ . '/data/bug-3506.php'], []);
2200+
}
2201+
21952202
#[RequiresPhp('>= 8.0')]
21962203
public function testBug12317(): void
21972204
{
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug3506;
4+
5+
class A {
6+
/**
7+
* @phpstan-param \Closure(int, mixed...) : void $c
8+
*/
9+
function dummy(\Closure $c) : void{
10+
11+
}
12+
13+
function dummy2() : void{
14+
$this->dummy(function(int $a, ...$args) : void{
15+
var_dump(...$args);
16+
});
17+
}
18+
}

0 commit comments

Comments
 (0)