Skip to content

Commit 7bd849c

Browse files
committed
Work around swiftinterface generation bug on Windows.
Works around the issue described in swiftlang/swift#76279.
1 parent 9de9084 commit 7bd849c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Sources/Testing/Issues/Issue+Recording.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,13 @@ extension Issue {
239239
// MARK: - Debugging failures
240240

241241
/// A unique value used by ``failureBreakpoint()``.
242-
@usableFromInline @exclusivity(unchecked) nonisolated(unsafe) var failureBreakpointValue = 0
242+
@usableFromInline
243+
#if !os(Windows)
244+
// Work around compiler bug by not specifying unchecked exclusivity on Windows.
245+
// SEE: https://github.com/swiftlang/swift/issues/76279
246+
@exclusivity(unchecked)
247+
#endif
248+
nonisolated(unsafe) var failureBreakpointValue = 0
243249

244250
/// A function called by the testing library when a failure occurs.
245251
///
@@ -272,5 +278,5 @@ func failureBreakpoint() {
272278
// opportunities elsewhere. Instead, this function performs a trivial
273279
// operation on a usable-from-inline value, which the compiler must assume
274280
// cannot be optimized away.
275-
failureBreakpointValue = 1
281+
failureBreakpointValue = 0
276282
}

0 commit comments

Comments
 (0)