From ba60a44dc6b0009f0da4e51037105e48a92c8a55 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Mon, 26 Jun 2023 08:37:42 -0400 Subject: [PATCH] Expectation handlers need to be @Sendable. #454 --- .../Public/Asynchronous/XCTNSNotificationExpectation.swift | 2 +- .../XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/XCTest/Public/Asynchronous/XCTNSNotificationExpectation.swift b/Sources/XCTest/Public/Asynchronous/XCTNSNotificationExpectation.swift index 573c6c270..dc8678047 100644 --- a/Sources/XCTest/Public/Asynchronous/XCTNSNotificationExpectation.swift +++ b/Sources/XCTest/Public/Asynchronous/XCTNSNotificationExpectation.swift @@ -19,7 +19,7 @@ open class XCTNSNotificationExpectation: XCTestExpectation { /// - Returns: `true` if the expectation should be fulfilled, `false` if it should not. /// /// - SeeAlso: `XCTNSNotificationExpectation.handler` - public typealias Handler = (Notification) -> Bool + public typealias Handler = @Sendable (Notification) -> Bool private let queue = DispatchQueue(label: "org.swift.XCTest.XCTNSNotificationExpectation") diff --git a/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift b/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift index 08d0cf26b..b41bca147 100644 --- a/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift +++ b/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift @@ -18,7 +18,7 @@ open class XCTNSPredicateExpectation: XCTestExpectation { /// - Returns: `true` if the expectation should be fulfilled, `false` if it should not. /// /// - SeeAlso: `XCTNSPredicateExpectation.handler` - public typealias Handler = () -> Bool + public typealias Handler = @Sendable () -> Bool private let queue = DispatchQueue(label: "org.swift.XCTest.XCTNSPredicateExpectation")