@@ -267,10 +267,11 @@ public class RecoveryTests: XCTestCase {
267
267
var source = """
268
268
(first second third struct: Int)
269
269
"""
270
- let ( _, currentToken) = source. withUTF8 { buffer in
271
- var parser = Parser ( buffer)
272
- return ( parser. parseFunctionSignature ( ) , parser. currentToken)
273
- }
270
+ let ( _, currentToken) : ( RawFunctionSignatureSyntax , Lexer . Lexeme ) =
271
+ source. withUTF8 { buffer in
272
+ var parser = Parser ( buffer)
273
+ return ( parser. parseFunctionSignature ( ) , parser. currentToken)
274
+ }
274
275
275
276
// The 'struct' keyword should be taken as an indicator that a new decl
276
277
// starts here, so `parseFunctionSignature` shouldn't eat it.
@@ -334,10 +335,11 @@ public class RecoveryTests: XCTestCase {
334
335
(first second third
335
336
: Int)
336
337
"""
337
- let ( _, currentToken) = source. withUTF8 { buffer in
338
- var parser = Parser ( buffer)
339
- return ( parser. parseFunctionSignature ( ) , parser. currentToken)
340
- }
338
+ let ( _, currentToken) : ( RawFunctionSignatureSyntax , Lexer . Lexeme ) =
339
+ source. withUTF8 { buffer in
340
+ var parser = Parser ( buffer)
341
+ return ( parser. parseFunctionSignature ( ) , parser. currentToken)
342
+ }
341
343
342
344
XCTAssertEqual ( currentToken. tokenKind, . colon)
343
345
}
0 commit comments