Skip to content

Commit 7c49de5

Browse files
staabmondrejmirtes
authored andcommitted
Prevent unnecessary scope merging
1 parent e453085 commit 7c49de5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4816,7 +4816,7 @@ public function isInFirstLevelStatement(): bool
48164816

48174817
public function mergeWith(?self $otherScope): self
48184818
{
4819-
if ($otherScope === null) {
4819+
if ($otherScope === null || $this === $otherScope) {
48204820
return $this;
48214821
}
48224822
$ourExpressionTypes = $this->expressionTypes;

0 commit comments

Comments
 (0)