mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Support missing Sendable conformances everywhere in the requirement machine
This commit is contained in:
@@ -168,8 +168,26 @@ extension MultiConformance: @unchecked Sendable {} // expected-error {{redundant
|
||||
|
||||
// rdar://91174106 - allow missing Sendable conformances when extending a
|
||||
// type generically.
|
||||
// FIXME: Should warn because of missing Sendable, but currently is silent.
|
||||
// We don't want a hard error except in Swift 6.
|
||||
// FIXME: Should warn because of missing Sendable, but currently is silent
|
||||
// because we aren't checking conformance availability here yet.
|
||||
struct X<T: Sendable> { }
|
||||
enum Y {}
|
||||
extension X where T == Y {}
|
||||
|
||||
protocol P2 {
|
||||
associatedtype A: Sendable
|
||||
}
|
||||
|
||||
enum Y2: P2, P3 {
|
||||
typealias A = Y
|
||||
}
|
||||
|
||||
struct X2<T: P2> { }
|
||||
extension X2 where T == Y2 { }
|
||||
|
||||
protocol P3 {
|
||||
associatedtype A
|
||||
}
|
||||
|
||||
struct X3<T: P3> where T.A: Sendable { }
|
||||
extension X3 where T == Y2 { }
|
||||
|
||||
Reference in New Issue
Block a user