Skip to content

Commit e6639f1

Browse files
Merge pull request #79445 from coffmark/fix/qoi-for-conformance-to-non-copyable
Sema: Add missing space to Copyable conformance suppression fix-it
2 parents 66c2e2c + cc6f1a1 commit e6639f1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Sema/TypeCheckInvertible.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static void addConformanceFixIt(const NominalTypeDecl *nominal,
3838
text.append(": ");
3939
if (inverse) text.append("~");
4040
text.append(getProtocolName(proto));
41+
text.append(" ");
4142
diag.fixItInsert(fixItLoc, text);
4243
} else {
4344
auto fixItLoc = nominal->getInherited().getEndLoc();

test/Generics/inverse_generics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ extension Maybe: Copyable where Wrapped: Copyable {}
155155
// expected-note@+2{{requirement specified as 'Wrapped' : 'Copyable'}}
156156
// expected-note@+1{{requirement from conditional conformance of 'Maybe<Wrapped>' to 'Copyable'}}
157157
struct RequireCopyable<T> {
158-
// expected-note@-1 {{consider adding '~Copyable' to generic struct 'RequireCopyable'}}{{27-27=: ~Copyable}}
158+
// expected-note@-1 {{consider adding '~Copyable' to generic struct 'RequireCopyable'}}{{27-27=: ~Copyable }}
159159
deinit {} // expected-error {{deinitializer cannot be declared in generic struct 'RequireCopyable' that conforms to 'Copyable'}}
160160
}
161161

0 commit comments

Comments
 (0)