You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -97,7 +96,6 @@ final class InvalidTests: XCTestCase {
97
96
""",
98
97
diagnostics:[
99
98
DiagnosticSpec(message:"expected value and ')' to end function call"),
100
-
// TODO: Old parser expected error on line 3: expected expression in list of expressions
101
99
]
102
100
)
103
101
}
@@ -120,7 +118,6 @@ final class InvalidTests: XCTestCase {
120
118
}
121
119
""",
122
120
diagnostics:[
123
-
// TODO: Old parser expected error on line 3: expected ',' separator, Fix-It replacements: 32 - 32 = ','
124
121
DiagnosticSpec(message:"expected ')' to end function call"),
125
122
]
126
123
)
@@ -130,10 +127,7 @@ final class InvalidTests: XCTestCase {
130
127
AssertParse(
131
128
"""
132
129
super.init()
133
-
""",
134
-
diagnostics:[
135
-
// TODO: Old parser expected error on line 1: 'super' cannot be used outside of class members
136
-
]
130
+
"""
137
131
)
138
132
}
139
133
@@ -186,22 +180,19 @@ final class InvalidTests: XCTestCase {
186
180
_ = " >> \( abc 1️⃣} ) << "2️⃣
187
181
"""##,
188
182
diagnostics:[
189
-
// TODO: Old parser expected error on line 4: expected ',' separator, Fix-It replacements: 18 - 18 = ','
190
-
// TODO: Old parser expected error on line 4: expected expression in list of expressions
191
183
DiagnosticSpec(locationMarker:"1️⃣", message:"unexpected brace in string literal"),
192
184
DiagnosticSpec(locationMarker:"2️⃣", message:"expected '}' to end function"),
193
185
]
194
186
)
195
187
}
196
188
197
189
func testInvalid11(){
190
+
// rdar://problem/18507467
198
191
AssertParse(
199
192
"""
200
-
// rdar://problem/18507467
201
193
func d(_ b: 1️⃣String 2️⃣-> 3️⃣<T>() -> T4️⃣) {}
202
194
""",
203
195
diagnostics:[
204
-
// TODO: Old parser expected error on line 2: expected type for function result
205
196
DiagnosticSpec(locationMarker:"1️⃣", message:"expected '(' to start function type"),
206
197
DiagnosticSpec(locationMarker:"2️⃣", message:"expected ')' in function type"),
207
198
DiagnosticSpec(locationMarker:"3️⃣", message:"expected type in function type"),
@@ -218,11 +209,7 @@ final class InvalidTests: XCTestCase {
218
209
protocol Animal<Food> {
219
210
func feed(_ food: Food)
220
211
}
221
-
""",
222
-
diagnostics:[
223
-
// TODO: Old parser expected error on line 2: an associated type named 'Food' must be declared in the protocol 'Animal' or a protocol it inherits
224
-
// TODO: Old parser expected error on line 3: cannot find type 'Food' in scope
225
-
]
212
+
"""
226
213
)
227
214
}
228
215
@@ -240,7 +227,6 @@ final class InvalidTests: XCTestCase {
240
227
}
241
228
""",
242
229
diagnostics:[
243
-
// TODO: Old parser expected error on line 6: expected ':' following argument label and parameter name
244
230
DiagnosticSpec(message:"expected ':' and type in function parameter"),
245
231
]
246
232
)
@@ -256,7 +242,6 @@ final class InvalidTests: XCTestCase {
256
242
}
257
243
""",
258
244
diagnostics:[
259
-
// TODO: Old parser expected error on line 4: unexpected ',' separator
260
245
DiagnosticSpec(message:"expected value in function call"),
261
246
]
262
247
)
@@ -275,10 +260,7 @@ final class InvalidTests: XCTestCase {
275
260
AssertParse(
276
261
"""
277
262
func f1_43591(a : inout inout Int) {}
278
-
""",
279
-
diagnostics:[
280
-
// TODO: Old parser expected error on line 1: parameter must not have multiple '__owned', 'inout', or '__shared' specifiers, Fix-It replacements: 19 - 25 = ''
281
-
]
263
+
"""
282
264
)
283
265
}
284
266
@@ -289,8 +271,7 @@ final class InvalidTests: XCTestCase {
289
271
func f2_43591(1️⃣inout inout b: Int) {}
290
272
""",
291
273
diagnostics:[
292
-
// TODO: Old parser expected error on line 2: parameter must not have multiple '__owned', 'inout', or '__shared' specifiers, Fix-It replacements: 21 - 27 = ''
293
-
DiagnosticSpec(message:"'inout inout' before a parameter name is not allowed", fixIts:["move 'inout inout' after type"]),
274
+
DiagnosticSpec(message:"'inout inout' before a parameter name is not allowed", fixIts:["move 'inout inout' in front of type"]),
294
275
], fixedSource:"func f2_43591(b: inout Int) {}"
295
276
)
296
277
}
@@ -302,9 +283,6 @@ final class InvalidTests: XCTestCase {
302
283
""",
303
284
diagnostics:[
304
285
// TODO: Old parser expected warning on line 3: 'let' in this position is interpreted as an argument label, Fix-It replacements: 15 - 18 = '`let`'
305
-
// TODO: Old parser expected error on line 3: expected ',' separator, Fix-It replacements: 22 - 22 = ','
306
-
// TODO: Old parser expected error on line 3: expected ':' following argument label and parameter name
307
-
// TODO: Old parser expected warning on line 3: extraneous duplicate parameter name; 'let' already has an argument label, Fix-It replacements: 15 - 19 = ''
308
286
DiagnosticSpec(message:"unexpected code 'a' in function parameter"),
309
287
]
310
288
)
@@ -316,7 +294,6 @@ final class InvalidTests: XCTestCase {
316
294
func f4_43591(1️⃣inout x: inout String) {}
317
295
""",
318
296
diagnostics:[
319
-
// TODO: Old parser expected error on line 4: parameter must not have multiple '__owned', 'inout', or '__shared' specifiers, Fix-It replacements: 15 - 20 = ''
320
297
DiagnosticSpec(message:"'inout' before a parameter name is not allowed"),
321
298
]
322
299
)
@@ -391,11 +368,9 @@ final class InvalidTests: XCTestCase {
391
368
func testInvalid22(){
392
369
AssertParse(
393
370
"""
394
-
let 1️⃣for 2️⃣= 2
371
+
let 1️⃣for = 2
395
372
""",
396
373
diagnostics:[
397
-
// TODO: Old parser expected error on line 1: keyword 'for' cannot be used as an identifier here
398
-
// TODO: Old parser expected note on line 1: if this name is unavoidable, use backticks to escape it, Fix-It replacements: 5 - 8 = '`for`'
399
374
DiagnosticSpec(message:"keyword 'for' cannot be used as an identifier here"),
0 commit comments