From 0c3e12920bf535488ccd0a98bed62cb633dfd6ee Mon Sep 17 00:00:00 2001 From: DJ Mitchell Date: Tue, 12 Nov 2024 13:51:28 -0500 Subject: [PATCH] Override reportIssue(_:_:) to add @_transparency attribute --- .../RuntimeWarningReporter.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift b/Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift index 2ef970e..f9d4992 100644 --- a/Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift +++ b/Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift @@ -90,6 +90,24 @@ public struct _RuntimeWarningReporter: IssueReporter { #endif } + @_transparent + public func reportIssue( + _ error: any Error, + _ message: @autoclosure () -> String?, + fileID: StaticString, + filePath: StaticString, + line: UInt, + column: UInt + ) { + reportIssue( + "Caught error: \(error)\(message().map { ": \($0)" } ?? "")", + fileID: fileID, + filePath: filePath, + line: line, + column: column + ) + } + public func expectIssue( _ message: @autoclosure () -> String?, fileID: StaticString,