|
8 | 8 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ANY_INT_2 > %t.results
|
9 | 9 | // RUN:%FileCheck %s -check-prefix=ANY_INT < %t.results
|
10 | 10 | // RUN:%FileCheck %s -check-prefix=ANY_INT_STATIC_CURRY < %t.results
|
| 11 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ANY_INT_3 | %FileCheck %s -check-prefix=ANY_INT |
| 12 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ANY_INT_4 | %FileCheck %s -check-prefix=ANY_INT |
11 | 13 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INT_ANY_0 | %FileCheck %s -check-prefix=INT_ANY
|
12 | 14 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INT_ANY_1 | %FileCheck %s -check-prefix=INT_ANY
|
13 | 15 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INT_ANY_2 > %t.results
|
14 | 16 | // RUN: %FileCheck %s -check-prefix=INT_ANY < %t.results
|
15 | 17 | // RUN: %FileCheck %s -check-prefix=INT_ANY_STATIC_CURRY < %t.results
|
| 18 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INT_ANY_3 > %t.results |
16 | 19 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=VOID_INT_INT_0 | %FileCheck %s -check-prefix=VOID_INT_INT
|
17 | 20 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=VOID_INT_INT_1 | %FileCheck %s -check-prefix=VOID_INT_INT
|
18 | 21 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=VOID_INT_INT_2 | %FileCheck %s -check-prefix=VOID_INT_INT
|
@@ -109,6 +112,14 @@ do {
|
109 | 112 | func take(_: @escaping (Any)->Int) {}
|
110 | 113 | take(S0.#^ANY_INT_2^#)
|
111 | 114 | }
|
| 115 | +do { |
| 116 | + func take(_: @escaping ((Any)->Int)???!) {} |
| 117 | + take(S0().#^ANY_INT_3^#) |
| 118 | +} |
| 119 | +do { |
| 120 | + let take: ((Any)->Int)? |
| 121 | + take = S0().#^ANY_INT_4^# |
| 122 | +} |
112 | 123 |
|
113 | 124 | // ANY_INT: Begin completions
|
114 | 125 | // ANY_INT-DAG: Decl{{.*}}/TypeRelation[Convertible]: anyToInt(a:);
|
@@ -174,6 +185,10 @@ do {
|
174 | 185 | func take(_: @escaping (Int)->Any) {}
|
175 | 186 | take(S0.#^INT_ANY_2^#)
|
176 | 187 | }
|
| 188 | +do { |
| 189 | + func take(_: @escaping ((Int)->Any)?) {} |
| 190 | + take(S0.#^INT_ANY_3^#) |
| 191 | +} |
177 | 192 |
|
178 | 193 | do {
|
179 | 194 | func take(_: @escaping ()->(Int)->Int) {}
|
|
0 commit comments