diff --git a/src/Psalm/Internal/Type/AssertionReconciler.php b/src/Psalm/Internal/Type/AssertionReconciler.php index a29565832..b7a1ef9a0 100644 --- a/src/Psalm/Internal/Type/AssertionReconciler.php +++ b/src/Psalm/Internal/Type/AssertionReconciler.php @@ -482,7 +482,7 @@ class AssertionReconciler extends Reconciler && !$new_type_has_interface && (!($statements_analyzer->getSource()->getSource() instanceof TraitAnalyzer) || ($key !== '$this' - && !($existing_var_type->hasLiteralClassString() && $new_type->hasLiteralClassString()))) + && strpos($original_assertion, 'isa-') !== 0)) && UnionTypeComparator::isContainedBy( $codebase, $existing_var_type,