Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,13 @@ public function testBug13065(): void
$this->analyse([__DIR__ . '/data/bug-13065.php'], $errors);
}

public function testBug3506(): void
{
$this->checkExplicitMixed = true;
$this->checkImplicitMixed = true;
$this->analyse([__DIR__ . '/data/bug-3506.php'], []);
}

#[RequiresPhp('>= 8.0')]
public function testBug12317(): void
{
Expand Down
18 changes: 18 additions & 0 deletions tests/PHPStan/Rules/Functions/data/bug-3506.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php declare(strict_types = 1);

namespace Bug3506;

class A {
/**
* @phpstan-param \Closure(int, mixed...) : void $c
*/
function dummy(\Closure $c) : void{

}

function dummy2() : void{
$this->dummy(function(int $a, ...$args) : void{
var_dump(...$args);
});
}
}
Loading