1
0
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:
Matthew Brown 2016-06-20 16:54:30 -04:00
parent 0ecbfdbd64
commit cf101b0fe0

View File

@ -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);
}