File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -3313,6 +3313,12 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
3313
3313
}
3314
3314
}
3315
3315
3316
+ // If the right-hand side and result type are both type parameters, we're
3317
+ // not providing a useful completion.
3318
+ if (expr->getType ()->isTypeParameter () &&
3319
+ CCE.getType ()->isTypeParameter ())
3320
+ return ;
3321
+
3316
3322
addInfixOperatorCompletion (op, expr->getType (), CCE.getType ());
3317
3323
}
3318
3324
}
Original file line number Diff line number Diff line change @@ -468,25 +468,6 @@ namespace {
468
468
FunctionRefKind::Compound,
469
469
locator));
470
470
471
- if (!archetype) {
472
- // If the nested type is not an archetype (because it was constrained
473
- // to a concrete type by a requirement), return the fresh type
474
- // variable now, and let binding occur during overload resolution.
475
- return memberTypeVar;
476
- }
477
-
478
- // FIXME: Would be better to walk the requirements of the protocol
479
- // of which the associated type is a member.
480
- if (auto superclass = member->getSuperclass ()) {
481
- CS.addConstraint (ConstraintKind::Subtype, memberTypeVar,
482
- superclass, locator);
483
- }
484
-
485
- for (auto proto : member->getConformingProtocols ()) {
486
- CS.addConstraint (ConstraintKind::ConformsTo, memberTypeVar,
487
- proto->getDeclaredType (), locator);
488
- }
489
-
490
471
return memberTypeVar;
491
472
});
492
473
}
You can’t perform that action at this time.
0 commit comments