Skip to content

Commit f306a8b

Browse files
committed
Fix
1 parent 7ddfa17 commit f306a8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,13 @@ static function () use ($expr, $rightResult): MutatingScope {
23432343
$scope = $result->getScope();
23442344
$scope = $this->revertNonNullability($scope, $nonNullabilityResult->getSpecifiedExpressions());
23452345

2346-
if (!$expr->left instanceof PropertyFetch) {
2346+
if ($expr->left instanceof PropertyFetch || $expr->left instanceof Expr\NullsafePropertyFetch) {
2347+
$scope = $this->lookForExitVariableAssign($scope, $expr->left->var);
2348+
} elseif ($expr->left instanceof StaticPropertyFetch) {
2349+
if ($expr->left->class instanceof Expr) {
2350+
$scope = $this->lookForExitVariableAssign($scope, $expr->left->class);
2351+
}
2352+
} else {
23472353
$scope = $this->lookForExitVariableAssign($scope, $expr->left);
23482354
}
23492355
$result = $this->processExprNode($expr->right, $scope, $nodeCallback, $context->enterDeep());

0 commit comments

Comments
 (0)