From 86c627231ecb1d5c880b25b9bfe1dffd2bd1f291 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Mon, 27 Oct 2025 16:56:51 -0400 Subject: [PATCH] Ensure `NonisolatedNonsendingByDefault` doesn't break exit tests. When `NonisolatedNonsendingByDefault` is enabled, overload resolution of `ExitTest.__store()` picks the overload that takes any old `T` instead of taking a function. This overload exists only to suppress certain unhelpful compiler diagnostics and its implementation immediately aborts, which causes the described failure. Adding `nonisolated(nonsending)` or `@concurrent` to the "good" overload doesn't appear to satisfy the type checker, so mark the "bad" overload as explicitly disfavoured instead. Resolves #1375. --- Sources/Testing/ExitTests/ExitTest.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Testing/ExitTests/ExitTest.swift b/Sources/Testing/ExitTests/ExitTest.swift index 9b7fa7c21..e6fec4257 100644 --- a/Sources/Testing/ExitTests/ExitTest.swift +++ b/Sources/Testing/ExitTests/ExitTest.swift @@ -381,6 +381,7 @@ extension ExitTest { #if compiler(>=6.2) @safe #endif + @_disfavoredOverload public static func __store( _ id: (UInt64, UInt64, UInt64, UInt64), _ body: T,