Skip to content

Commit 6682df5

Browse files
authored
Merge pull request #455 from apple/jgrynspan/sendable-handlers
Expectation handlers need to be @sendable. #454
2 parents 7f69208 + ba60a44 commit 6682df5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/XCTest/Public/Asynchronous/XCTNSNotificationExpectation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open class XCTNSNotificationExpectation: XCTestExpectation {
1919
/// - Returns: `true` if the expectation should be fulfilled, `false` if it should not.
2020
///
2121
/// - SeeAlso: `XCTNSNotificationExpectation.handler`
22-
public typealias Handler = (Notification) -> Bool
22+
public typealias Handler = @Sendable (Notification) -> Bool
2323

2424
private let queue = DispatchQueue(label: "org.swift.XCTest.XCTNSNotificationExpectation")
2525

Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ open class XCTNSPredicateExpectation: XCTestExpectation {
1818
/// - Returns: `true` if the expectation should be fulfilled, `false` if it should not.
1919
///
2020
/// - SeeAlso: `XCTNSPredicateExpectation.handler`
21-
public typealias Handler = () -> Bool
21+
public typealias Handler = @Sendable () -> Bool
2222

2323
private let queue = DispatchQueue(label: "org.swift.XCTest.XCTNSPredicateExpectation")
2424

0 commit comments

Comments
 (0)