1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Prevent overwriting storage type during analysis

This commit is contained in:
Matt Brown 2021-03-13 14:12:55 -05:00
parent 90fd1c5d1f
commit b549989ba7

View File

@ -439,7 +439,7 @@ class NewAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\CallAna
if ($fq_class_name === 'SplObjectStorage') {
$generic_param_type = Type::getEmpty();
} else {
$generic_param_type = array_values($base_type)[0];
$generic_param_type = clone array_values($base_type)[0];
}
}