@@ -110,7 +110,7 @@ public typealias KnownIssueMatcher = @Sendable (_ issue: Issue) -> Bool
110110/// Because all errors thrown by `body` are caught as known issues, this
111111/// function is not throwing. If only some errors or issues are known to occur
112112/// while others should continue to cause test failures, use
113- /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)-5vi5n ``
113+ /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)``
114114/// instead.
115115public func withKnownIssue(
116116 _ comment: Comment ? = nil ,
@@ -161,7 +161,7 @@ public func withKnownIssue(
161161///
162162/// It is not necessary to specify both `precondition` and `issueMatcher` if
163163/// only one is relevant. If all errors and issues should be considered known
164- /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)-95r6o ``
164+ /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)``
165165/// instead.
166166///
167167/// - Note: `issueMatcher` may be invoked more than once for the same issue.
@@ -200,6 +200,7 @@ public func withKnownIssue(
200200/// - isIntermittent: Whether or not the known issue occurs intermittently. If
201201/// this argument is `true` and the known issue does not occur, no secondary
202202/// issue is recorded.
203+ /// - isolation: The actor to which `body` is isolated, if any.
203204/// - sourceLocation: The source location to which any recorded issues should
204205/// be attributed.
205206/// - body: The function to invoke.
@@ -218,15 +219,16 @@ public func withKnownIssue(
218219/// Because all errors thrown by `body` are caught as known issues, this
219220/// function is not throwing. If only some errors or issues are known to occur
220221/// while others should continue to cause test failures, use
221- /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)-47y3z ``
222+ /// ``withKnownIssue(_:isIntermittent:isolation: sourceLocation:_:when:matching:)``
222223/// instead.
223224public func withKnownIssue(
224225 _ comment: Comment ? = nil ,
225226 isIntermittent: Bool = false ,
227+ isolation: isolated ( any Actor ) ? = #isolation,
226228 sourceLocation: SourceLocation = #_sourceLocation,
227229 _ body: ( ) async throws -> Void
228230) async {
229- try ? await withKnownIssue ( comment, isIntermittent: isIntermittent, sourceLocation: sourceLocation, body, matching: { _ in true } )
231+ try ? await withKnownIssue ( comment, isIntermittent: isIntermittent, isolation : isolation , sourceLocation: sourceLocation, body, matching: { _ in true } )
230232}
231233
232234/// Invoke a function that has a known issue that is expected to occur during
@@ -237,6 +239,7 @@ public func withKnownIssue(
237239/// - isIntermittent: Whether or not the known issue occurs intermittently. If
238240/// this argument is `true` and the known issue does not occur, no secondary
239241/// issue is recorded.
242+ /// - isolation: The actor to which `body` is isolated, if any.
240243/// - sourceLocation: The source location to which any recorded issues should
241244/// be attributed.
242245/// - body: The function to invoke.
@@ -269,13 +272,14 @@ public func withKnownIssue(
269272///
270273/// It is not necessary to specify both `precondition` and `issueMatcher` if
271274/// only one is relevant. If all errors and issues should be considered known
272- /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)-3g6b7 ``
275+ /// issues, use ``withKnownIssue(_:isIntermittent:isolation: sourceLocation:_:when:matching:) ``
273276/// instead.
274277///
275278/// - Note: `issueMatcher` may be invoked more than once for the same issue.
276279public func withKnownIssue(
277280 _ comment: Comment ? = nil ,
278281 isIntermittent: Bool = false ,
282+ isolation: isolated ( any Actor ) ? = #isolation,
279283 sourceLocation: SourceLocation = #_sourceLocation,
280284 _ body: ( ) async throws -> Void ,
281285 when precondition: ( ) async -> Bool = { true } ,
0 commit comments