Skip to content

Commit 0b4ab1e

Browse files
committed
Fix return with overriding @var
1 parent 7bf18c8 commit 0b4ab1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ private function processStmtNode(
907907
return new InternalStatementResult($scope, $hasYield, $isAlwaysTerminating, [], $throwPoints, $impurePoints);
908908
} elseif ($stmt instanceof Return_) {
909909
if ($stmt->expr !== null) {
910-
$result = $this->processExprNode($stmt, $stmt->expr, $scope, $storage, $nodeCallback, ExpressionContext::createDeep());
910+
$result = $this->processExprNode($stmt, $stmt->expr, $stmtScope, $storage, $nodeCallback, ExpressionContext::createDeep());
911911
$throwPoints = $result->getThrowPoints();
912912
$impurePoints = $result->getImpurePoints();
913913
$scope = $result->getScope();

0 commit comments

Comments
 (0)