From a67437d01e288669ce14dc59daf453e39526b67a Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Mon, 3 Nov 2025 15:08:22 -0500 Subject: [PATCH] Disfavor overloads of `__checkFunctionCall()` with variadic generics. This works around rdar://122011759 which appears to have been exacerbated by https://github.com/swiftlang/swift/pull/84907. --- Sources/Testing/Expectations/ExpectationChecking+Macro.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Testing/Expectations/ExpectationChecking+Macro.swift b/Sources/Testing/Expectations/ExpectationChecking+Macro.swift index b47dbd910..ed81d1f59 100644 --- a/Sources/Testing/Expectations/ExpectationChecking+Macro.swift +++ b/Sources/Testing/Expectations/ExpectationChecking+Macro.swift @@ -198,6 +198,7 @@ private func _callBinaryOperator( /// /// - Warning: This function is used to implement the `#expect()` and /// `#require()` macros. Do not call it directly. +@_disfavoredOverload public func __checkFunctionCall( _ lhs: T, calling functionCall: (T, repeat each U) throws -> Bool, _ arguments: repeat each U, expression: __Expression, @@ -367,6 +368,7 @@ public func __checkInoutFunctionCall( /// /// - Warning: This function is used to implement the `#expect()` and /// `#require()` macros. Do not call it directly. +@_disfavoredOverload public func __checkFunctionCall( _ lhs: T, calling functionCall: (T, repeat each U) throws -> R?, _ arguments: repeat each U, expression: __Expression,