Support missing Sendable conformances everywhere in the requirement machine

This commit is contained in:
Doug Gregor
2022-04-08 16:10:38 -07:00
parent 45c7d6f4b8
commit f3fd64a71b
3 changed files with 24 additions and 4 deletions

View File

@@ -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 { }