Skip to content

Commit 97a194d

Browse files
committed
test: simplify test and enable more broadly
Use the implicit conversion of a closure to an actor isolated closure to trigger the assertion failure. This allows us to test this more broadly on all platforms with concurrency.
1 parent 9cd004c commit 97a194d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
// REQUIRES: objc_interop, concurrency
2-
3-
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -print-indexed-symbols -source-filename %s | %FileCheck %s
4-
5-
import AppKit
1+
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s | %FileCheck %s
2+
// REQUIRES: concurrency
63

74
@MainActor
8-
class AppDelegate {
9-
let window = NSWindow()
10-
// CHECK: [[@LINE-1]]:16 | class/Swift | NSWindow | c:objc(cs)NSWindow | Ref,RelCont
11-
// CHECK: [[@LINE-2]]:16 | constructor/Swift | init() | c:objc(cs)NSObject(im)init | Ref,Call,RelCont
5+
public struct S {
6+
public init(_: @escaping () -> Void) { }
127
}
8+
9+
let s = S { }
10+
// CHECK: [[@LINE-1]]:9 | struct/Swift | S | s:14swift_ide_test1SV | Ref,RelCont
11+
// CHECK: [[@LINE-2]]:9 | constructor/Swift | init(_:) | s:14swift_ide_test1SVyACyyccfc | Ref,Call,RelCont

0 commit comments

Comments
 (0)