Skip to content

Commit 89ddae6

Browse files
authored
Merge branch refs/heads/1.12.x into 2.0.x
2 parents 1a7cadb + 621e168 commit 89ddae6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,9 @@ private function processStmtNode(
844844
} elseif ($stmt instanceof Node\Stmt\Trait_) {
845845
return new StatementResult($scope, false, false, [], [], []);
846846
} elseif ($stmt instanceof Node\Stmt\ClassLike) {
847+
if (!$context->isTopLevel()) {
848+
return new StatementResult($scope, false, false, [], [], []);
849+
}
847850
$hasYield = false;
848851
$throwPoints = [];
849852
$impurePoints = [];

0 commit comments

Comments
 (0)