@@ -157,16 +157,16 @@ extension Test {
157
157
///
158
158
/// - Warning: This function is used to implement the `@Test` macro. Do not
159
159
/// call it directly.
160
- public static func __function(
160
+ public static func __function< S > (
161
161
named testFunctionName: String ,
162
- in containingType: ( any ~ Copyable . Type) ? ,
162
+ in containingType: S . Type ? ,
163
163
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
164
164
displayName: String ? = nil ,
165
165
traits: [ any TestTrait ] ,
166
166
sourceLocation: SourceLocation ,
167
167
parameters: [ __Parameter ] = [ ] ,
168
168
testFunction: @escaping @Sendable ( ) async throws -> Void
169
- ) -> Self {
169
+ ) -> Self where S : ~ Copyable {
170
170
// Don't use Optional.map here due to a miscompile/crash. Expand out to an
171
171
// if expression instead. SEE: rdar://134280902
172
172
let containingTypeInfo : TypeInfo ? = if let containingType {
@@ -241,17 +241,17 @@ extension Test {
241
241
///
242
242
/// - Warning: This function is used to implement the `@Test` macro. Do not
243
243
/// call it directly.
244
- public static func __function< C> (
244
+ public static func __function< S , C> (
245
245
named testFunctionName: String ,
246
- in containingType: ( any ~ Copyable . Type) ? ,
246
+ in containingType: S . Type ? ,
247
247
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
248
248
displayName: String ? = nil ,
249
249
traits: [ any TestTrait ] ,
250
250
arguments collection: @escaping @Sendable ( ) async throws -> C ,
251
251
sourceLocation: SourceLocation ,
252
252
parameters paramTuples: [ __Parameter ] ,
253
253
testFunction: @escaping @Sendable ( C . Element) async throws -> Void
254
- ) -> Self where C: Collection & Sendable , C. Element: Sendable {
254
+ ) -> Self where S : ~ Copyable , C: Collection & Sendable , C. Element: Sendable {
255
255
let containingTypeInfo : TypeInfo ? = if let containingType {
256
256
TypeInfo ( describing: containingType)
257
257
} else {
@@ -388,17 +388,17 @@ extension Test {
388
388
///
389
389
/// - Warning: This function is used to implement the `@Test` macro. Do not
390
390
/// call it directly.
391
- public static func __function< C1, C2> (
391
+ public static func __function< S , C1, C2> (
392
392
named testFunctionName: String ,
393
- in containingType: ( any ~ Copyable . Type) ? ,
393
+ in containingType: S . Type ? ,
394
394
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
395
395
displayName: String ? = nil ,
396
396
traits: [ any TestTrait ] ,
397
397
arguments collection1: @escaping @Sendable ( ) async throws -> C1 , _ collection2: @escaping @Sendable ( ) async throws -> C2 ,
398
398
sourceLocation: SourceLocation ,
399
399
parameters paramTuples: [ __Parameter ] ,
400
400
testFunction: @escaping @Sendable ( C1 . Element, C2 . Element) async throws -> Void
401
- ) -> Self where C1: Collection & Sendable , C1. Element: Sendable , C2: Collection & Sendable , C2. Element: Sendable {
401
+ ) -> Self where S : ~ Copyable , C1 : Collection & Sendable , C1. Element: Sendable , C2: Collection & Sendable , C2. Element: Sendable {
402
402
let containingTypeInfo : TypeInfo ? = if let containingType {
403
403
TypeInfo ( describing: containingType)
404
404
} else {
@@ -416,17 +416,17 @@ extension Test {
416
416
///
417
417
/// - Warning: This function is used to implement the `@Test` macro. Do not
418
418
/// call it directly.
419
- public static func __function< C, E1, E2> (
419
+ public static func __function< S , C, E1, E2> (
420
420
named testFunctionName: String ,
421
- in containingType: ( any ~ Copyable . Type) ? ,
421
+ in containingType: S . Type ? ,
422
422
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
423
423
displayName: String ? = nil ,
424
424
traits: [ any TestTrait ] ,
425
425
arguments collection: @escaping @Sendable ( ) async throws -> C ,
426
426
sourceLocation: SourceLocation ,
427
427
parameters paramTuples: [ __Parameter ] ,
428
428
testFunction: @escaping @Sendable ( ( E1, E2) ) async throws -> Void
429
- ) -> Self where C: Collection & Sendable , C. Element == ( E1 , E2 ) , E1: Sendable , E2: Sendable {
429
+ ) -> Self where S : ~ Copyable , C: Collection & Sendable , C. Element == ( E1 , E2 ) , E1: Sendable , E2: Sendable {
430
430
let containingTypeInfo : TypeInfo ? = if let containingType {
431
431
TypeInfo ( describing: containingType)
432
432
} else {
@@ -447,17 +447,17 @@ extension Test {
447
447
///
448
448
/// - Warning: This function is used to implement the `@Test` macro. Do not
449
449
/// call it directly.
450
- public static func __function< Key, Value> (
450
+ public static func __function< S , Key, Value> (
451
451
named testFunctionName: String ,
452
- in containingType: ( any ~ Copyable . Type) ? ,
452
+ in containingType: S . Type ? ,
453
453
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
454
454
displayName: String ? = nil ,
455
455
traits: [ any TestTrait ] ,
456
456
arguments dictionary: @escaping @Sendable ( ) async throws -> Dictionary < Key , Value > ,
457
457
sourceLocation: SourceLocation ,
458
458
parameters paramTuples: [ __Parameter ] ,
459
459
testFunction: @escaping @Sendable ( ( Key, Value) ) async throws -> Void
460
- ) -> Self where Key: Sendable , Value: Sendable {
460
+ ) -> Self where S : ~ Copyable , Key: Sendable , Value: Sendable {
461
461
let containingTypeInfo : TypeInfo ? = if let containingType {
462
462
TypeInfo ( describing: containingType)
463
463
} else {
@@ -472,17 +472,17 @@ extension Test {
472
472
///
473
473
/// - Warning: This function is used to implement the `@Test` macro. Do not
474
474
/// call it directly.
475
- public static func __function< C1, C2> (
475
+ public static func __function< S , C1, C2> (
476
476
named testFunctionName: String ,
477
- in containingType: ( any ~ Copyable . Type) ? ,
477
+ in containingType: S . Type ? ,
478
478
xcTestCompatibleSelector: __XCTestCompatibleSelector ? ,
479
479
displayName: String ? = nil ,
480
480
traits: [ any TestTrait ] ,
481
481
arguments zippedCollections: @escaping @Sendable ( ) async throws -> Zip2Sequence < C1 , C2 > ,
482
482
sourceLocation: SourceLocation ,
483
483
parameters paramTuples: [ __Parameter ] ,
484
484
testFunction: @escaping @Sendable ( C1 . Element, C2 . Element) async throws -> Void
485
- ) -> Self where C1: Collection & Sendable , C1. Element: Sendable , C2: Collection & Sendable , C2. Element: Sendable {
485
+ ) -> Self where S : ~ Copyable , C1 : Collection & Sendable , C1. Element: Sendable , C2: Collection & Sendable , C2. Element: Sendable {
486
486
let containingTypeInfo : TypeInfo ? = if let containingType {
487
487
TypeInfo ( describing: containingType)
488
488
} else {
@@ -556,7 +556,7 @@ extension Test {
556
556
///
557
557
/// - Warning: This function is used to implement the `@Test` macro. Do not use
558
558
/// it directly.
559
- @unsafe @inlinable public func __requiringUnsafe< T> ( _ value: consuming T ) throws -> T where T: ~ Copyable {
559
+ @unsafe @inlinable public func __requiringUnsafe< T> ( _ value: consuming T ) -> T where T: ~ Copyable {
560
560
value
561
561
}
562
562
0 commit comments