|
7 | 7 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_NO_DOT_2 | %FileCheck %s -check-prefix=FOO_OBJECT_NO_DOT |
8 | 8 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_DOT_1 | %FileCheck %s -check-prefix=FOO_STRUCT_DOT |
9 | 9 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_NO_DOT_1 | %FileCheck %s -check-prefix=FOO_STRUCT_NO_DOT |
| 10 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_META_1 | %FileCheck %s -check-prefix=FOO_STRUCT_META |
| 11 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_META_2 | %FileCheck %s -check-prefix=FOO_STRUCT_META |
10 | 12 |
|
11 | 13 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_0 | %FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_0 |
12 | 14 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_1 | %FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_1 |
@@ -501,6 +503,21 @@ func testMetatypeExprWithoutDot() { |
501 | 503 | FooStruct#^FOO_STRUCT_NO_DOT_1^# |
502 | 504 | } |
503 | 505 |
|
| 506 | +struct NoMetaCompletions { |
| 507 | + static var foo: Int = 0 |
| 508 | + class func bar() {} |
| 509 | + typealias Foo = Int |
| 510 | +} |
| 511 | +func testMetatypeCompletions() { |
| 512 | + NoMetaCompletions.Type.#^FOO_STRUCT_META_1^# |
| 513 | +} |
| 514 | +func testMetatypeCompletionsWithoutDot() { |
| 515 | + NoMetaCompletions.Type#^FOO_STRUCT_META_2^# |
| 516 | +} |
| 517 | +// FOO_STRUCT_META-NOT: Decl |
| 518 | +// FOO_STRUCT_META: Keyword[self]/CurrNominal: {{self|.self}}[#NoMetaCompletions.Type.Type#]; name=self |
| 519 | +// FOO_STRUCT_META-NOT: Decl |
| 520 | + |
504 | 521 | func testImplicitlyCurriedFunc(_ fs: inout FooStruct) { |
505 | 522 | FooStruct.instanceFunc0(&fs)#^IMPLICITLY_CURRIED_FUNC_0^# |
506 | 523 | // IMPLICITLY_CURRIED_FUNC_0: Begin completions |
|
0 commit comments