From e79820321028daddef7ad6c6097cc37901c15047 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 22 Jan 2026 08:24:27 +0100 Subject: [PATCH] ExpressionTypeHolder: Prevent unnecessary work --- src/Analyser/ExpressionTypeHolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analyser/ExpressionTypeHolder.php b/src/Analyser/ExpressionTypeHolder.php index c904db8d7d..1be893b4bd 100644 --- a/src/Analyser/ExpressionTypeHolder.php +++ b/src/Analyser/ExpressionTypeHolder.php @@ -39,7 +39,7 @@ public function equals(self $other): bool public function and(self $other): self { - if ($this->type->equals($other->type)) { + if ($this->type === $other->type || $this->type->equals($other->type)) { if ($this->certainty->equals($other->certainty)) { return $this; }