[Completion] Downgrade a couple of ASSERTs for 6.2

This commit is contained in:
Hamish Knight
2025-07-09 13:05:59 +01:00
parent 91222b9ebe
commit c562306c8d

View File

@@ -393,8 +393,14 @@ static TypeRelation calculateTypeRelation(Type Ty, Type ExpectedTy,
return TypeRelation::Unknown;
}
ASSERT(!Ty->hasUnboundGenericType() && !ExpectedTy->hasUnboundGenericType());
ASSERT(!ExpectedTy->hasTypeParameter());
if (Ty->hasUnboundGenericType() || ExpectedTy->hasUnboundGenericType()) {
CONDITIONAL_ASSERT(false && "Must not have unbound generic type here");
return TypeRelation::Unrelated;
}
if (ExpectedTy->hasTypeParameter()) {
CONDITIONAL_ASSERT(false && "Must not have generic type here");
return TypeRelation::Unrelated;
}
if (Ty->isEqual(ExpectedTy))
return TypeRelation::Convertible;