Skip to content

Commit 98587b0

Browse files
committed
Fix LegacyNodeScopeResolverTest with trait uses
1 parent 45fd568 commit 98587b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,11 @@ public function __invoke(Node $node, Scope $scope): void
12541254
$hasYield = false;
12551255
$throwPoints = [];
12561256
$impurePoints = [];
1257-
$this->processTraitUse($stmt, $scope, $storage->duplicate(), $nodeCallback);
1257+
1258+
$traitStorage = $storage->duplicate();
1259+
$traitStorage->pendingFibers = [];
1260+
$this->processTraitUse($stmt, $scope, $traitStorage, $nodeCallback);
1261+
$this->processPendingFibers($traitStorage);
12581262
} elseif ($stmt instanceof Foreach_) {
12591263
$condResult = $this->processExprNode($stmt, $stmt->expr, $scope, $storage, $nodeCallback, ExpressionContext::createDeep());
12601264
$throwPoints = $overridingThrowPoints ?? $condResult->getThrowPoints();

0 commit comments

Comments
 (0)