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

Clone a little earlier

This commit is contained in:
Matthew Brown 2020-04-04 23:45:38 -04:00
parent c6afa0fef6
commit 120595f480

View File

@ -1928,12 +1928,12 @@ class ExpressionAnalyzer
$classlike_storage = $codebase->classlike_storage_provider->get($expression_atomic_type->value);
if ($classlike_storage->yield) {
$yield_type = $classlike_storage->yield;
$yield_type = clone $classlike_storage->yield;
if ($expression_atomic_type instanceof Type\Atomic\TGenericObject) {
$yield_type = PropertyFetchAnalyzer::localizePropertyType(
$codebase,
clone $yield_type,
$yield_type,
$expression_atomic_type,
$classlike_storage,
$classlike_storage