@@ -53,9 +53,8 @@ public typealias __XCTestCompatibleSelector = Never
53
53
/// - Parameters:
54
54
/// - traits: Zero or more traits to apply to this test suite.
55
55
///
56
- /// A test suite is a type that contains one or more test functions. Any
57
- /// copyable type (that is, any type that is not marked `~Copyable`) may be a
58
- /// test suite.
56
+ /// A test suite is a type that contains one or more test functions. Any type
57
+ /// may be a test suite.
59
58
///
60
59
/// The use of the `@Suite` attribute is optional; types are recognized as test
61
60
/// suites even if they do not have the `@Suite` attribute applied to them.
@@ -81,9 +80,8 @@ public macro Suite(
81
80
/// from the associated type's name.
82
81
/// - traits: Zero or more traits to apply to this test suite.
83
82
///
84
- /// A test suite is a type that contains one or more test functions. Any
85
- /// copyable type (that is, any type that is not marked `~Copyable`) may be a
86
- /// test suite.
83
+ /// A test suite is a type that contains one or more test functions. Any type
84
+ /// may be a test suite.
87
85
///
88
86
/// The use of the `@Suite` attribute is optional; types are recognized as test
89
87
/// suites even if they do not have the `@Suite` attribute applied to them.
@@ -106,7 +104,7 @@ extension Test {
106
104
/// - Warning: This function is used to implement the `@Suite` macro. Do not
107
105
/// call it directly.
108
106
public static func __type(
109
- _ containingType: any ~ Copyable. Type,
107
+ _ containingType: any ( ~ Copyable & ~ Escapable ) . Type,
110
108
displayName: String ? = nil ,
111
109
traits: [ any SuiteTrait ] ,
112
110
sourceLocation: SourceLocation
@@ -159,7 +157,7 @@ extension Test {
159
157
/// call it directly.
160
158
public static func __function(
161
159
named testFunctionName: String ,
162
- in containingType: ( any ~ Copyable. Type) ? ,
160
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
163
161
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
164
162
displayName: String ? = nil ,
165
163
traits: [ any TestTrait ] ,
@@ -241,7 +239,7 @@ extension Test {
241
239
/// call it directly.
242
240
public static func __function< C> (
243
241
named testFunctionName: String ,
244
- in containingType: ( any ~ Copyable. Type) ? ,
242
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
245
243
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
246
244
displayName: String ? = nil ,
247
245
traits: [ any TestTrait ] ,
@@ -376,7 +374,7 @@ extension Test {
376
374
/// call it directly.
377
375
public static func __function< C1, C2> (
378
376
named testFunctionName: String ,
379
- in containingType: ( any ~ Copyable. Type) ? ,
377
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
380
378
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
381
379
displayName: String ? = nil ,
382
380
traits: [ any TestTrait ] ,
@@ -404,7 +402,7 @@ extension Test {
404
402
/// call it directly.
405
403
public static func __function< C, E1, E2> (
406
404
named testFunctionName: String ,
407
- in containingType: ( any ~ Copyable. Type) ? ,
405
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
408
406
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
409
407
displayName: String ? = nil ,
410
408
traits: [ any TestTrait ] ,
@@ -435,7 +433,7 @@ extension Test {
435
433
/// call it directly.
436
434
public static func __function< Key, Value> (
437
435
named testFunctionName: String ,
438
- in containingType: ( any ~ Copyable. Type) ? ,
436
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
439
437
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
440
438
displayName: String ? = nil ,
441
439
traits: [ any TestTrait ] ,
@@ -460,7 +458,7 @@ extension Test {
460
458
/// call it directly.
461
459
public static func __function< C1, C2> (
462
460
named testFunctionName: String ,
463
- in containingType: ( any ~ Copyable. Type) ? ,
461
+ in containingType: ( any ( ~ Copyable & ~ Escapable ) . Type) ? ,
464
462
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
465
463
displayName: String ? = nil ,
466
464
traits: [ any TestTrait ] ,
@@ -524,7 +522,7 @@ extension Test {
524
522
///
525
523
/// - Warning: This function is used to implement the `@Test` macro. Do not use
526
524
/// it directly.
527
- @inlinable public func __requiringTry< T> ( _ value: consuming T ) throws -> T where T: ~ Copyable {
525
+ @inlinable public func __requiringTry< T> ( _ value: consuming T ) throws -> T where T: ~ Copyable & ~ Escapable {
528
526
value
529
527
}
530
528
@@ -533,7 +531,7 @@ extension Test {
533
531
///
534
532
/// - Warning: This function is used to implement the `@Test` macro. Do not use
535
533
/// it directly.
536
- @inlinable public func __requiringAwait< T> ( _ value: consuming T , isolation: isolated ( any Actor ) ? = #isolation) async -> T where T: ~ Copyable {
534
+ @inlinable public func __requiringAwait< T> ( _ value: consuming T , isolation: isolated ( any Actor ) ? = #isolation) async -> T where T: ~ Copyable & ~ Escapable {
537
535
value
538
536
}
539
537
@@ -556,7 +554,7 @@ public var __defaultSynchronousIsolationContext: (any Actor)? {
556
554
_ selector: __XCTestCompatibleSelector ? ,
557
555
onInstanceOf type: T . Type ,
558
556
sourceLocation: SourceLocation
559
- ) async throws -> Bool where T: ~ Copyable {
557
+ ) async throws -> Bool where T: ~ Copyable & ~ Escapable {
560
558
false
561
559
}
562
560
0 commit comments