Skip to content

Commit 41ec46a

Browse files
committed
Revert "[Conformance] Always downgrade redundant conformances to marker protocols to"
This reverts commit 5eb16ad.
1 parent d85797b commit 41ec46a

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6390,7 +6390,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
63906390
}
63916391

63926392
if ((existingModule != dc->getParentModule() && conformanceInOrigModule) ||
6393-
diag.Protocol->isMarkerProtocol()) {
6393+
isSendable) {
63946394
// Warn about the conformance.
63956395
if (isSendable && SendableConformance &&
63966396
isa<InheritedProtocolConformance>(SendableConformance)) {

test/decl/protocol/conforms/redundant_conformance.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,3 @@ class Class3 {
8686
class SomeMockClass: Class3.ProviderThree { // okay
8787
var someInt: Int = 5
8888
}
89-
90-
91-
class ImplicitCopyable {}
92-
93-
class InheritImplicitCopyable: ImplicitCopyable, Copyable {}
94-
// expected-warning@-1 {{redundant conformance of 'InheritImplicitCopyable' to protocol 'Copyable'}}
95-
// expected-note@-2 {{'InheritImplicitCopyable' inherits conformance to protocol 'Copyable' from superclass here}}

0 commit comments

Comments
 (0)