mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Mixed cannot be substituted
This commit is contained in:
parent
0ecbfdbd64
commit
cf101b0fe0
@ -61,6 +61,10 @@ class Union extends Type
|
||||
|
||||
public function substitute(Union $old_type, Union $new_type = null)
|
||||
{
|
||||
if ($this->isMixed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($old_type->types as $old_type_part) {
|
||||
$this->removeType($old_type_part->value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user