|
1 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testMembersPostfix1 | %FileCheck %s -check-prefix=testMembersPostfix1 |
2 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testMembersDot1 | %FileCheck %s -check-prefix=testMembersDot1 |
3 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testMembersDot2 | %FileCheck %s -check-prefix=testMembersDot2 |
4 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testMultipleSubscript1 | %FileCheck %s -check-prefix=testMultipleSubscript1 |
5 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInherit1 | %FileCheck %s -check-prefix=testInherit1 |
6 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInherit2 | %FileCheck %s -check-prefix=testInherit2 |
7 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testShadow1 | %FileCheck %s -check-prefix=testShadow1 |
8 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testGeneric1 | %FileCheck %s -check-prefix=testGeneric1 |
9 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testGenericUnderconstrained1 | %FileCheck %s -check-prefix=testGenericUnderconstrained1 |
10 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testExistential1 | %FileCheck %s -check-prefix=testGenericUnderconstrained1 |
11 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testExistential2 | %FileCheck %s -check-prefix=testExistential2 |
12 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testProtocolConform1 | %FileCheck %s -check-prefix=testProtocolConform1 |
13 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OnSelf1 | %FileCheck %s -check-prefix=OnSelf1 |
14 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testSelfExtension1 | %FileCheck %s -check-prefix=testSelfExtension1 |
15 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInvalid1 | %FileCheck %s -check-prefix=testInvalid1 |
16 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInvalid2 | %FileCheck %s -check-prefix=testInvalid2 |
17 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInvalid3 | %FileCheck %s -check-prefix=testInvalid3 |
18 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testInvalid4 | %FileCheck %s -check-prefix=testInvalid4 |
19 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testGenericRoot1 | %FileCheck %s -check-prefix=testGenericRoot1 |
20 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testGenericResult1 | %FileCheck %s -check-prefix=testGenericResult1 |
21 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testAnyObjectRoot1 | %FileCheck %s -check-prefix=testAnyObjectRoot1 |
22 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testNested1 | %FileCheck %s -check-prefix=testNested1 |
23 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testNested2 | %FileCheck %s -check-prefix=testNested2 |
24 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testCycle1 | %FileCheck %s -check-prefix=testCycle1 |
25 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testCycle2 | %FileCheck %s -check-prefix=testCycle2 |
26 |
| -// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=testSubscriptOnProtocolExt | %FileCheck %s -check-prefix=testSubscriptOnProtocolExt |
| 1 | +// RUN: %batch-code-completion |
27 | 2 |
|
28 | 3 | struct Point {
|
29 | 4 | var x: Int
|
@@ -154,7 +129,7 @@ func testGenericUnderconstrained1<G: P>(r: G) {
|
154 | 129 | // testGenericUnderconstrained1-NOT: CurrNominal
|
155 | 130 |
|
156 | 131 | func testExistential1(r: P) {
|
157 |
| - r.#^testExistential1^# |
| 132 | + r.#^testExistential1?check=testGenericUnderconstrained1^# |
158 | 133 | }
|
159 | 134 |
|
160 | 135 | @dynamicMemberLookup
|
@@ -381,3 +356,17 @@ func testSubscriptOnProtocolExtension(dyn: DynamicLookupConcrete) {
|
381 | 356 | // testSubscriptOnProtocolExt: Decl[InstanceVar]/CurrNominal: x[#Int#];
|
382 | 357 | // testSubscriptOnProtocolExt: Decl[InstanceVar]/CurrNominal: y[#Int#];
|
383 | 358 | }
|
| 359 | + |
| 360 | +// https://github.com/swiftlang/swift/issues/77035 |
| 361 | +@dynamicMemberLookup |
| 362 | +struct HasSendableKeyPath<T> { |
| 363 | + subscript<U>(dynamicMember keyPath: KeyPath<T, U> & Sendable) -> HasSendableKeyPath<U> { |
| 364 | + fatalError() |
| 365 | + } |
| 366 | +} |
| 367 | + |
| 368 | +func testSendableKeyPath(_ x: HasSendableKeyPath<Point>) { |
| 369 | + x.#^SENDABLE_KEYPATH_POINT^# |
| 370 | + // SENDABLE_KEYPATH_POINT-DAG: Decl[InstanceVar]/CurrNominal: x[#HasSendableKeyPath<Int>#]; name=x |
| 371 | + // SENDABLE_KEYPATH_POINT-DAG: Decl[InstanceVar]/CurrNominal: y[#HasSendableKeyPath<Int>#]; name=y |
| 372 | +} |
0 commit comments