diff --git a/flang/lib/evaluate/type.cc b/flang/lib/evaluate/type.cc index f98cdcc65c81..047e3b72f178 100644 --- a/flang/lib/evaluate/type.cc +++ b/flang/lib/evaluate/type.cc @@ -174,7 +174,7 @@ bool DynamicType::IsTkCompatibleWith(const DynamicType &that) const { } else if (!derived_ || !that.derived_ || !IsKindCompatible(*derived_, *that.derived_)) { return false; // kind params don't match - } else if (!IsPolymorphic() && that.derived_ != nullptr) { + } else if (!IsPolymorphic()) { return derived_->typeSymbol() == that.derived_->typeSymbol(); } else { return IsAncestorTypeOf(derived_, that.derived_);