1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Always be cloning

This commit is contained in:
Brown 2020-04-03 13:56:03 -04:00
parent b340f2b0ce
commit 08594cf712
2 changed files with 2 additions and 2 deletions

View File

@ -328,7 +328,7 @@ class ReturnTypeCollector
$generator_type = new Atomic\TGenericObject(
'Generator',
[
$key_type ?: Type::getInt(),
$key_type ? clone $key_type : Type::getInt(),
clone $value_type,
Type::getMixed(),
Type::getMixed()

View File

@ -1933,7 +1933,7 @@ class ExpressionAnalyzer
if ($expression_atomic_type instanceof Type\Atomic\TGenericObject) {
$yield_type = PropertyFetchAnalyzer::localizePropertyType(
$codebase,
$yield_type,
clone $yield_type,
$expression_atomic_type,
$classlike_storage,
$classlike_storage