Skip to content

Commit e6061e6

Browse files
authored
Remove @convention(thin) from exit test macro declarations. (#1153)
`@convention(thin)` is not fully plumbed through the compiler and should not be in our API surface, but also because of the experimental value capturing feature the closures may be thick anyway. See also swiftlang/swift-evolution#2884. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent f66ef03 commit e6061e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/Testing/Expectations/Expectation+Macro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public macro expect(
525525
observing observedValues: [any PartialKeyPath<ExitTest.Result> & Sendable] = [],
526526
_ comment: @autoclosure () -> Comment? = nil,
527527
sourceLocation: SourceLocation = #_sourceLocation,
528-
performing expression: @escaping @Sendable @convention(thin) () async throws -> Void
528+
performing expression: @escaping @Sendable () async throws -> Void
529529
) -> ExitTest.Result? = #externalMacro(module: "TestingMacros", type: "ExitTestExpectMacro")
530530

531531
/// Check that an expression causes the process to terminate in a given fashion
@@ -572,7 +572,7 @@ public macro require(
572572
observing observedValues: [any PartialKeyPath<ExitTest.Result> & Sendable] = [],
573573
_ comment: @autoclosure () -> Comment? = nil,
574574
sourceLocation: SourceLocation = #_sourceLocation,
575-
performing expression: @escaping @Sendable @convention(thin) () async throws -> Void
575+
performing expression: @escaping @Sendable () async throws -> Void
576576
) -> ExitTest.Result = #externalMacro(module: "TestingMacros", type: "ExitTestRequireMacro")
577577

578578
/// Capture a sendable and codable value to pass to an exit test.

Sources/Testing/Expectations/ExpectationChecking+Macro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ public func __checkClosureCall(
11481148
identifiedBy exitTestID: (UInt64, UInt64, UInt64, UInt64),
11491149
processExitsWith expectedExitCondition: ExitTest.Condition,
11501150
observing observedValues: [any PartialKeyPath<ExitTest.Result> & Sendable] = [],
1151-
performing _: @convention(thin) () -> Void,
1151+
performing _: @convention(c) () -> Void,
11521152
expression: __Expression,
11531153
comments: @autoclosure () -> [Comment],
11541154
isRequired: Bool,
@@ -1181,7 +1181,7 @@ public func __checkClosureCall<each T>(
11811181
encodingCapturedValues capturedValues: (repeat each T),
11821182
processExitsWith expectedExitCondition: ExitTest.Condition,
11831183
observing observedValues: [any PartialKeyPath<ExitTest.Result> & Sendable] = [],
1184-
performing _: @convention(thin) () -> Void,
1184+
performing _: @convention(c) () -> Void,
11851185
expression: __Expression,
11861186
comments: @autoclosure () -> [Comment],
11871187
isRequired: Bool,

0 commit comments

Comments
 (0)