|
14 | 14 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_0 | %FileCheck %s -check-prefix=STRING_0
|
15 | 15 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_1 | %FileCheck %s -check-prefix=STRING_1
|
16 | 16 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_2 | %FileCheck %s -check-prefix=STRING_2
|
| 17 | +// RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_3 | %FileCheck %s -check-prefix=STRING_3 |
| 18 | +// RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_4 | %FileCheck %s -check-prefix=STRING_4 |
| 19 | +// RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=STRING_5 | %FileCheck %s -check-prefix=STRING_5 |
17 | 20 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=ARRAY_0 | %FileCheck %s -check-prefix=ARRAY_0
|
18 | 21 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=ARRAY_1 | %FileCheck %s -check-prefix=ARRAY_1
|
19 | 22 | // RUN: %target-swift-ide-test -code-completion -source-filename=%s -code-completion-token=ARRAY_2 | %FileCheck %s -check-prefix=ARRAY_2
|
@@ -62,6 +65,13 @@ struct MyString1: ExpressibleByStringLiteral {
|
62 | 65 | init(extendedGraphemeClusterLiteral value: String) {}
|
63 | 66 | init(stringLiteral value: String) {}
|
64 | 67 | }
|
| 68 | +struct MyUnicodeScalar1: ExpressibleByUnicodeScalarLiteral { |
| 69 | + init(unicodeScalarLiteral value: Character) {} |
| 70 | +} |
| 71 | +struct MyCharacter1: ExpressibleByExtendedGraphemeClusterLiteral { |
| 72 | + init(unicodeScalarLiteral value: Character) {} |
| 73 | + init(extendedGraphemeClusterLiteral value: String) {} |
| 74 | +} |
65 | 75 | struct MyArray1<Element>: ExpressibleByArrayLiteral {
|
66 | 76 | init(arrayLiteral value: Element...) {}
|
67 | 77 | }
|
@@ -154,6 +164,19 @@ func testString2() {
|
154 | 164 | }
|
155 | 165 | // STRING_2: Literal[String]/None/TypeRelation[Identical]: "{#(abc)#}"[#String#];
|
156 | 166 |
|
| 167 | +func testString3() { |
| 168 | + let x: MyUnicodeScalar1 = #^STRING_3^# |
| 169 | +} |
| 170 | +// STRING_3: Literal[String]/None/TypeRelation[Identical]: "{#(abc)#}"[#MyUnicodeScalar1#]; |
| 171 | +func testString4() { |
| 172 | + let x: MyCharacter1 = #^STRING_4^# |
| 173 | +} |
| 174 | +// STRING_4: Literal[String]/None/TypeRelation[Identical]: "{#(abc)#}"[#MyCharacter1#]; |
| 175 | +func testString5() { |
| 176 | + let x: Character = #^STRING_5^# |
| 177 | +} |
| 178 | +// STRING_5: Literal[String]/None/TypeRelation[Identical]: "{#(abc)#}"[#Character#]; |
| 179 | + |
157 | 180 | func testArray0() {
|
158 | 181 | let x: Int = #^ARRAY_0^#
|
159 | 182 | }
|
|
0 commit comments