Skip to content

Commit c562306

Browse files
committed
[Completion] Downgrade a couple of ASSERTs for 6.2
1 parent 91222b9 commit c562306

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/IDE/CodeCompletionResultType.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,14 @@ static TypeRelation calculateTypeRelation(Type Ty, Type ExpectedTy,
393393
return TypeRelation::Unknown;
394394
}
395395

396-
ASSERT(!Ty->hasUnboundGenericType() && !ExpectedTy->hasUnboundGenericType());
397-
ASSERT(!ExpectedTy->hasTypeParameter());
396+
if (Ty->hasUnboundGenericType() || ExpectedTy->hasUnboundGenericType()) {
397+
CONDITIONAL_ASSERT(false && "Must not have unbound generic type here");
398+
return TypeRelation::Unrelated;
399+
}
400+
if (ExpectedTy->hasTypeParameter()) {
401+
CONDITIONAL_ASSERT(false && "Must not have generic type here");
402+
return TypeRelation::Unrelated;
403+
}
398404

399405
if (Ty->isEqual(ExpectedTy))
400406
return TypeRelation::Convertible;

0 commit comments

Comments
 (0)