Fix ABI mismatch involving Sendable-refining protocols and deployment targets

A change to the way we determined whether a protocol conformance is
"dependent" for marker protocols caused an ABI break for
Sendable-refining protocols built with pre-6.0 Swift compilers. The
fix for this issue (https://github.com/swiftlang/swift/pull/75769)
gated the change on deployment target.

The deployment target change fixed the original problem, then caused a
related issue when a project mixes deployment targets (pre-6.0 and
6.0+) with non-resilient protocols. Exempt non-resilient protocols from
this change so we get consistent behavior.

Fixes rdar://134953989.
This commit is contained in:
Doug Gregor
2024-09-10 11:03:48 -07:00
parent 863d2e4656
commit cd52e2d4e5
3 changed files with 41 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
public protocol NonResilientSendableBase: Sendable {
func f()
}
public protocol NonResilientSendable: NonResilientSendableBase {
func g()
}
public struct ConformsToNonResilientSendable: NonResilientSendable {
public func f() { }
public func g() { }
}