Skip to content

Commit 5514dd0

Browse files
committed
Fix CI failures [claude-ci-fix]
Automated fix attempt 1 for CI failures.
1 parent ca881d7 commit 5514dd0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Analyser/NodeScopeResolver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4175,6 +4175,10 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
41754175
$hasYield = true;
41764176
} elseif ($expr instanceof Expr\Match_) {
41774177
$deepContext = $context->enterDeep();
4178+
$condIsIncDec = $expr->cond instanceof Expr\PreInc
4179+
|| $expr->cond instanceof Expr\PostInc
4180+
|| $expr->cond instanceof Expr\PreDec
4181+
|| $expr->cond instanceof Expr\PostDec;
41784182
$condType = $scope->getType($expr->cond);
41794183
$condNativeType = $scope->getNativeType($expr->cond);
41804184
$condResult = $this->processExprNode($stmt, $expr->cond, $scope, $storage, $nodeCallback, $deepContext);
@@ -4183,7 +4187,7 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
41834187
$throwPoints = $condResult->getThrowPoints();
41844188
$impurePoints = $condResult->getImpurePoints();
41854189
$isAlwaysTerminating = $condResult->isAlwaysTerminating();
4186-
$matchScope = $scope->enterMatch($expr, $condType, $condNativeType);
4190+
$matchScope = $scope->enterMatch($expr, $condIsIncDec ? $condType : null, $condIsIncDec ? $condNativeType : null);
41874191
$armNodes = [];
41884192
$hasDefaultCond = false;
41894193
$hasAlwaysTrueCond = false;

0 commit comments

Comments
 (0)