You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-warning@-1 {{converting non-Sendable function value to '@Sendable () -> Void' may introduce data races}}
536
536
}
537
+
538
+
// Don't forget about parameter packs -- https://github.com/swiftlang/swift/issues/82614
539
+
540
+
@available(SwiftStdlib 5.1,*)
541
+
protocolPackProto{
542
+
func foo<eachA:Sendable>(_ a:repeateachA)async
543
+
func bar<eachA>(_ a:repeateachA)async
544
+
// expected-note@-1 {{consider making generic parameter 'each A' conform to the 'Sendable' protocol}}
545
+
}
546
+
547
+
@available(SwiftStdlib 5.1,*)
548
+
actorPackActor:PackProto{
549
+
func foo<eachA:Sendable>(_ a:repeateachA)async{
550
+
forbinrepeat(each a){
551
+
print(b)
552
+
}
553
+
}
554
+
func bar<eachA>(_ a:repeateachA)async{
555
+
// expected-warning@-1 {{non-Sendable parameter type 'repeat each A' cannot be sent from caller of protocol requirement 'bar' into actor-isolated implementation; this is an error in the Swift 6 language mode}}
0 commit comments