File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4575,7 +4575,17 @@ bool UnintendedExtraGenericParamMemberFailure::diagnoseAsError() {
45754575 SourceLoc loc = genericTy->getDecl ()->getSourceRange ().End ;
45764576 StringRef replacement;
45774577
4578- if (archetype->getConformsTo ().size ()) {
4578+ // FIXME: this won't handle an explicit Copyable written in source, but it's
4579+ // close enough.
4580+ bool conformsToAnExplicitRequirement = false ;
4581+ for (auto proto : archetype->getConformsTo ()) {
4582+ if (proto->getInvertibleProtocolKind ())
4583+ continue ;
4584+ conformsToAnExplicitRequirement = true ;
4585+ break ;
4586+ }
4587+
4588+ if (conformsToAnExplicitRequirement) {
45794589 loc = loc.getAdvancedLoc (
45804590 archetype->getConformsTo ().back ()->getName ().getLength ());
45814591 replacement = " &" ;
You can’t perform that action at this time.
0 commit comments