|
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 | 125 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OVERLOADED_CLOSURE_RETURN | %FileCheck %s -check-prefix=OVERLOADED_CLOSURE_RETURN
|
| 126 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE | %FileCheck %s -check-prefix=UNRESOLVED_3 |
| 127 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_OPT | %FileCheck %s -check-prefix=UNRESOLVED_3_OPT |
| 128 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_FUNCTY | %FileCheck %s -check-prefix=UNRESOLVED_3 |
| 129 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=AUTOCLOSURE_FUNCTY_OPT | %FileCheck %s -check-prefix=UNRESOLVED_3_OPT |
126 | 130 |
|
127 | 131 | enum SomeEnum1 {
|
128 | 132 | case South
|
@@ -798,3 +802,19 @@ func testClosureReturnTypeForOverloaded() {
|
798 | 802 | // OVERLOADED_CLOSURE_RETURN-DAG: Decl[EnumElement]/CurrNominal/TypeRelation[Identical]: West[#SomeEnum2#];
|
799 | 803 | // OVERLOADED_CLOSURE_RETURN: End completions
|
800 | 804 | }
|
| 805 | + |
| 806 | +func receiveAutoclosure(_: @autoclosure () -> SomeEnum1) {} |
| 807 | +func receiveAutoclosureOpt(_: @autoclosure () -> SomeEnum1?) {} |
| 808 | +func testAutoclosre() { |
| 809 | + receiveAutoclosure(.#^AUTOCLOSURE^#) |
| 810 | + // Same as UNRESOLVED_3 |
| 811 | + |
| 812 | + receiveAutoclosureOpt(.#^AUTOCLOSURE_OPT^#) |
| 813 | + // Same as UNRESOLVED_3_OPT |
| 814 | +} |
| 815 | +func testAutoclosreFuncTy(fn: (@autoclosure () -> SomeEnum1) -> Void, fnOpt: (@autoclosure () -> SomeEnum1?) -> Void) { |
| 816 | + fn(.#^AUTOCLOSURE_FUNCTY^#) |
| 817 | + // Same as UNRESOLVED_3 |
| 818 | + fnOpt(.#^AUTOCLOSURE_FUNCTY_OPT^#) |
| 819 | + // Same as UNRESOLVED_3_OPT |
| 820 | +} |
0 commit comments