File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -2494,15 +2494,8 @@ bool ContextualFailure::tryProtocolConformanceFixIt(
2494
2494
assert (!missingProtoTypeStrings.empty () &&
2495
2495
" type already conforms to all the protocols?" );
2496
2496
2497
- // If we didn't have a protocol composition type, it means we only have a
2498
- // single protocol, so just use it directly. Otherwise, construct a comma
2499
- // separated list of missing types.
2500
- std::string protoString;
2501
- if (missingProtoTypeStrings.size () == 1 ) {
2502
- protoString = missingProtoTypeStrings.front ();
2503
- } else {
2504
- protoString = llvm::join (missingProtoTypeStrings, " , " );
2505
- }
2497
+ // Combine all protocol names together, separated by commas.
2498
+ std::string protoString = llvm::join (missingProtoTypeStrings, " , " );
2506
2499
2507
2500
// Emit a diagnostic to inform the user that they need to conform to the
2508
2501
// missing protocols.
You can’t perform that action at this time.
0 commit comments