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() {
4575
4575
SourceLoc loc = genericTy->getDecl ()->getSourceRange ().End ;
4576
4576
StringRef replacement;
4577
4577
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) {
4579
4589
loc = loc.getAdvancedLoc (
4580
4590
archetype->getConformsTo ().back ()->getName ().getLength ());
4581
4591
replacement = " &" ;
You can’t perform that action at this time.
0 commit comments