Skip to content

Commit c5479ba

Browse files
committed
fix
1 parent f24ac4b commit c5479ba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ private function resolveType(string $exprString, Expr $node): Type
973973
!$node instanceof Variable
974974
&& !$node instanceof Expr\Closure
975975
&& !$node instanceof Expr\ArrowFunction
976+
&& !$this->expressionHasNewInChain($node)
976977
&& $this->hasExpressionType($node)->yes()
977978
) {
978979
return $this->expressionTypes[$exprString]->getType();
@@ -2742,10 +2743,6 @@ public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType,
27422743
}
27432744
}
27442745

2745-
if ($this->expressionHasNewInChain($expr)) {
2746-
return $this;
2747-
}
2748-
27492746
$scope = $this;
27502747
if (
27512748
$expr instanceof Expr\ArrayDimFetch

0 commit comments

Comments
 (0)