Skip to content

Commit 814bce4

Browse files
committed
wip
1 parent 24c6dc3 commit 814bce4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/IssueReporting/Internal/SwiftTesting.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ func _currentTest() -> _Test? {
324324
#endif
325325
}
326326

327-
return (function as! @Sendable () -> _Test?)()
327+
return withUnsafePointer(to: function) {
328+
$0.withMemoryRebound(to: (() -> _Test?).self, capacity: 1) {
329+
$0.pointee()
330+
}
331+
}
328332
}
329333

330334
#if DEBUG

0 commit comments

Comments
 (0)