diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php b/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php index 5395cc666..fa0955807 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php @@ -3378,7 +3378,7 @@ class AssertionFinder } - if ($other_var_name && $other_type) { + if ($other_var_name && $other_type && !$other_type->isMixed()) { if ($identical) { try { $assertion = $other_type->getAssertionString(true);