|
122 | 122 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TERNARY_5 | %FileCheck %s -check-prefix=UNRESOLVED_3_NOTIDEAL
|
123 | 123 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TERNARY_6 | %FileCheck %s -check-prefix=UNRESOLVED_3_NOTIDEAL
|
124 | 124 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TERNARY_CONDITION | %FileCheck %s -check-prefix=TERNARY_CONDITION
|
| 125 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE | %FileCheck %s -check-prefix=UNRESOLVED_3 |
| 126 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_OPT | %FileCheck %s -check-prefix=UNRESOLVED_3_OPT |
| 127 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_FUNCTY | %FileCheck %s -check-prefix=UNRESOLVED_3 |
| 128 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_FUNCTY_OPT | %FileCheck %s -check-prefix=UNRESOLVED_3_OPT |
125 | 129 |
|
126 | 130 | enum SomeEnum1 {
|
127 | 131 | case South
|
@@ -783,3 +787,19 @@ func testTernaryOperator2(cond: Bool) {
|
783 | 787 | // TERNARY_CONDITION-DAG: Decl[Constructor]/CurrNominal/IsSystem/TypeRelation[Identical]: init()[#Bool#]; name=init()
|
784 | 788 | // TERNARY_CONDITION: End completions
|
785 | 789 | }
|
| 790 | + |
| 791 | +func receiveAutoclosure(_: @autoclosure () -> SomeEnum1) {} |
| 792 | +func receiveAutoclosureOpt(_: @autoclosure () -> SomeEnum1?) {} |
| 793 | +func testAutoclosre() { |
| 794 | + receiveAutoclosure(.#^AUTOCLOSURE^#) |
| 795 | + // Same as UNRESOLVED_3 |
| 796 | + |
| 797 | + receiveAutoclosureOpt(.#^AUTOCLOSURE_OPT^#) |
| 798 | + // Same as UNRESOLVED_3_OPT |
| 799 | +} |
| 800 | +func testAutoclosreFuncTy(fn: (@autoclosure () -> SomeEnum1) -> Void, fnOpt: (@autoclosure () -> SomeEnum1?) -> Void) { |
| 801 | + fn(.#^AUTOCLOSURE_FUNCTY^#) |
| 802 | + // Same as UNRESOLVED_3 |
| 803 | + fnOpt(.#^AUTOCLOSURE_FUNCTY_OPT^#) |
| 804 | + // Same as UNRESOLVED_3_OPT |
| 805 | +} |
0 commit comments