|
1 | 1 | // RUN: %empty-directory(%t)
|
2 |
| -// RUN: %target-build-swift %import-libdispatch -parse-as-library %s -o %t/a.out |
| 2 | +// RUN: %target-build-swift %import-libdispatch -Xfrontend -disable-availability-checking -parse-as-library %s -o %t/a.out |
3 | 3 | // RUN: %target-codesign %t/a.out
|
4 | 4 | // RUN: %target-run %t/a.out | %FileCheck %s
|
5 | 5 |
|
@@ -80,25 +80,22 @@ actor ActorOnIsCheckImplementingExecutor<Ex: SerialExecutor> {
|
80 | 80 |
|
81 | 81 | @main struct Main {
|
82 | 82 | static func main() async {
|
83 |
| - if #available(SwiftStdlib 6.2, *) { |
84 |
| - |
85 |
| - let hasIsIsolatingCurrentContextExecutor = IsIsolatingExecutor() |
86 |
| - let justCheckIsolatedExecutor = JustCheckIsolatedExecutor() |
87 |
| - |
88 |
| - print("do checkIsolated with executor which does NOT implement isIsolatingCurrentContext") |
89 |
| - let checkIsolatedActor = ActorOnIsCheckImplementingExecutor(on: justCheckIsolatedExecutor) |
90 |
| - await checkIsolatedActor.checkPreconditionIsolated() |
91 |
| - // CHECK: Before preconditionIsolated |
92 |
| - // CHECK-NOT: called: isIsolatingCurrentContext |
93 |
| - // CHECK: called: checkIsolated |
94 |
| - // CHECK-NOT: called: isIsolatingCurrentContext |
95 |
| - // CHECK: After preconditionIsolated |
96 |
| - |
97 |
| - // CHECK: Before assumeIsolated |
98 |
| - // CHECK-NOT: called: isIsolatingCurrentContext |
99 |
| - // CHECK: called: checkIsolated |
100 |
| - // CHECK-NOT: called: isIsolatingCurrentContext |
101 |
| - // CHECK: After assumeIsolated |
102 |
| - } |
| 83 | + let hasIsIsolatingCurrentContextExecutor = IsIsolatingExecutor() |
| 84 | + let justCheckIsolatedExecutor = JustCheckIsolatedExecutor() |
| 85 | + |
| 86 | + print("do checkIsolated with executor which does NOT implement isIsolatingCurrentContext") |
| 87 | + let checkIsolatedActor = ActorOnIsCheckImplementingExecutor(on: justCheckIsolatedExecutor) |
| 88 | + await checkIsolatedActor.checkPreconditionIsolated() |
| 89 | + // CHECK: Before preconditionIsolated |
| 90 | + // CHECK-NOT: called: isIsolatingCurrentContext |
| 91 | + // CHECK: called: checkIsolated |
| 92 | + // CHECK-NOT: called: isIsolatingCurrentContext |
| 93 | + // CHECK: After preconditionIsolated |
| 94 | + |
| 95 | + // CHECK: Before assumeIsolated |
| 96 | + // CHECK-NOT: called: isIsolatingCurrentContext |
| 97 | + // CHECK: called: checkIsolated |
| 98 | + // CHECK-NOT: called: isIsolatingCurrentContext |
| 99 | + // CHECK: After assumeIsolated |
103 | 100 | }
|
104 | 101 | }
|
0 commit comments