Skip to content

Commit 02ea5fa

Browse files
committed
Fix match analysis
1 parent 7cb2cc2 commit 02ea5fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4272,8 +4272,7 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
42724272
}
42734273

42744274
$filteringExpr = $this->getFilteringExprForMatchArm($expr, $filteringExprs);
4275-
4276-
$bodyScope = $this->processExprNode($stmt, $filteringExpr, $matchScope, $storage, new NoopNodeCallback(), $deepContext)->getTruthyScope();
4275+
$bodyScope = $matchScope->filterByTruthyValue($filteringExpr);
42774276
$matchArmBody = new MatchExpressionArmBody($bodyScope, $arm->body);
42784277
$armNodes[$i] = new MatchExpressionArm($matchArmBody, $condNodes, $arm->getStartLine());
42794278

0 commit comments

Comments
 (0)