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 {
33133313 }
33143314 }
33153315
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+
33163322 addInfixOperatorCompletion (op, expr->getType (), CCE.getType ());
33173323 }
33183324 }
Original file line number Diff line number Diff line change @@ -468,25 +468,6 @@ namespace {
468468 FunctionRefKind::Compound,
469469 locator));
470470
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-
490471 return memberTypeVar;
491472 });
492473 }
You can’t perform that action at this time.
0 commit comments