File tree 2 files changed +9
-4
lines changed 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,12 @@ extension Issue {
239
239
// MARK: - Debugging failures
240
240
241
241
/// A unique value used by ``failureBreakpoint()``.
242
- @usableFromInline @exclusivity ( unchecked) nonisolated ( unsafe) var failureBreakpointValue = 0
242
+ #if !os(Windows)
243
+ // Work around compiler bug by not specifying unchecked exclusivity on Windows.
244
+ // SEE: https://github.com/swiftlang/swift/issues/76279
245
+ @exclusivity ( unchecked)
246
+ #endif
247
+ @usableFromInline nonisolated ( unsafe) var failureBreakpointValue = 0
243
248
244
249
/// A function called by the testing library when a failure occurs.
245
250
///
@@ -272,5 +277,5 @@ func failureBreakpoint() {
272
277
// opportunities elsewhere. Instead, this function performs a trivial
273
278
// operation on a usable-from-inline value, which the compiler must assume
274
279
// cannot be optimized away.
275
- failureBreakpointValue = 1
280
+ failureBreakpointValue = 0
276
281
}
Original file line number Diff line number Diff line change @@ -533,9 +533,9 @@ struct MiscellaneousTests {
533
533
534
534
@Test ( " failureBreakpoint() call " )
535
535
func failureBreakpointCall( ) {
536
- failureBreakpointValue = 0
536
+ failureBreakpointValue = 1
537
537
failureBreakpoint ( )
538
- #expect( failureBreakpointValue == 1 )
538
+ #expect( failureBreakpointValue == 0 )
539
539
}
540
540
541
541
@available ( _clockAPI, * )
You can’t perform that action at this time.
0 commit comments