File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ ConstraintSystem::getPotentialBindings(TypeVariableType *typeVar) {
148
148
// coalescing supertype bounds when we are able to compute the meet.
149
149
auto addPotentialBinding = [&](PotentialBinding binding,
150
150
bool allowJoinMeet = true ) {
151
+ assert (!binding.BindingType ->is <ErrorType>());
151
152
// If this is a non-defaulted supertype binding, check whether we can
152
153
// combine it with another supertype binding by computing the 'join' of the
153
154
// types.
@@ -374,6 +375,10 @@ ConstraintSystem::getPotentialBindings(TypeVariableType *typeVar) {
374
375
result.InvolvesTypeVariables = true ;
375
376
continue ;
376
377
}
378
+
379
+ // Do not attempt to bind to ErrorType.
380
+ if (type->hasError ())
381
+ continue ;
377
382
378
383
// If the type we'd be binding to is a dependent member, don't try to
379
384
// resolve this type variable yet.
You can’t perform that action at this time.
0 commit comments