Skip to content

Commit 9481e01

Browse files
committed
[ConstraintSystem] Defensive guard not to join unresolved type
in PotentialBindings::addPotentialBinding()
1 parent c68157a commit 9481e01

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ void ConstraintSystem::PotentialBindings::addPotentialBinding(
182182
// check whether we can combine it with another
183183
// supertype binding by computing the 'join' of the types.
184184
if (binding.Kind == AllowedBindingKind::Supertypes &&
185+
!binding.BindingType->hasUnresolvedType() &&
185186
!binding.BindingType->hasTypeVariable() &&
186187
!binding.BindingType->hasUnboundGenericType() &&
187188
!binding.DefaultedProtocol && !binding.isDefaultableBinding() &&

0 commit comments

Comments
 (0)