Skip to content

Commit

Permalink
Always be cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 3, 2020
1 parent b340f2b commit 08594cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ protected static function getYieldTypeFromExpression(
$generator_type = new Atomic\TGenericObject(
'Generator',
[
$key_type ?: Type::getInt(),
$key_type ? clone $key_type : Type::getInt(),
clone $value_type,
Type::getMixed(),
Type::getMixed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ protected static function analyzeYield(
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
Expand Down

0 comments on commit 08594cf

Please sign in to comment.