diff --git a/lib/Sema/TypeCheckProtocol.cpp b/lib/Sema/TypeCheckProtocol.cpp index 299b6848ee053..e4db09c1a2142 100644 --- a/lib/Sema/TypeCheckProtocol.cpp +++ b/lib/Sema/TypeCheckProtocol.cpp @@ -6283,7 +6283,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) { } if ((existingModule != dc->getParentModule() && conformanceInOrigModule) || - isSendable) { + diag.Protocol->isMarkerProtocol()) { // Warn about the conformance. if (isSendable && SendableConformance && isa(SendableConformance)) { diff --git a/test/Parse/inverses.swift b/test/Parse/inverses.swift index bdd26e64bbfdf..ae8b8f87480a7 100644 --- a/test/Parse/inverses.swift +++ b/test/Parse/inverses.swift @@ -143,7 +143,7 @@ struct Burrito: ~Copyable {} extension Burrito: Alias {} // expected-error {{conformance to 'Copyable' must be declared in a separate extension}} // expected-note@-1 {{'Burrito' declares conformance to protocol 'Copyable' here}} -extension Burrito: Copyable & Edible & P {} // expected-error {{redundant conformance of 'Burrito' to protocol 'Copyable'}} +extension Burrito: Copyable & Edible & P {} // expected-warning {{redundant conformance of 'Burrito' to protocol 'Copyable'}} struct Blah: ~Copyable {} extension Blah: P, Q, Copyable, R {} // expected-error {{generic struct 'Blah' required to be 'Copyable' but is marked with '~Copyable'}} diff --git a/test/decl/protocol/conforms/redundant_conformance.swift b/test/decl/protocol/conforms/redundant_conformance.swift index 0568637c8e173..41d8b1953f376 100644 --- a/test/decl/protocol/conforms/redundant_conformance.swift +++ b/test/decl/protocol/conforms/redundant_conformance.swift @@ -86,3 +86,10 @@ class Class3 { class SomeMockClass: Class3.ProviderThree { // okay var someInt: Int = 5 } + + +class ImplicitCopyable {} + +class InheritImplicitCopyable: ImplicitCopyable, Copyable {} +// expected-warning@-1 {{redundant conformance of 'InheritImplicitCopyable' to protocol 'Copyable'}} +// expected-note@-2 {{'InheritImplicitCopyable' inherits conformance to protocol 'Copyable' from superclass here}}