diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index 385fab83b5..45e6e9fdfd 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -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 { diff --git a/tests/PHPStan/Rules/Functions/data/bug-3506.php b/tests/PHPStan/Rules/Functions/data/bug-3506.php new file mode 100644 index 0000000000..ef2eb53a25 --- /dev/null +++ b/tests/PHPStan/Rules/Functions/data/bug-3506.php @@ -0,0 +1,18 @@ +dummy(function(int $a, ...$args) : void{ + var_dump(...$args); + }); + } +}