mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Mixed contains everything (#5763)
This commit is contained in:
parent
4fb2b65164
commit
55079e92fe
@ -266,6 +266,10 @@ class UnionTypeComparator
|
||||
?Type\Union $input_type,
|
||||
Type\Union $container_type
|
||||
): bool {
|
||||
if ($container_type->isMixed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$input_type) {
|
||||
return false;
|
||||
}
|
||||
|
@ -937,6 +937,22 @@ class MethodSignatureTest extends TestCase
|
||||
use MyTrait;
|
||||
}'
|
||||
],
|
||||
'MixedParamInImplementation' => [
|
||||
'<?php
|
||||
interface I
|
||||
{
|
||||
/**
|
||||
* @param mixed $a
|
||||
*/
|
||||
public function a($a): void;
|
||||
}
|
||||
|
||||
|
||||
final class B implements I
|
||||
{
|
||||
public function a(mixed $a): void {}
|
||||
}'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user