Skip to content

Commit 28970e1

Browse files
committed
---
yaml --- r: 348943 b: refs/heads/master c: ebbc9c8 h: refs/heads/master i: 348941: e04c26c 348939: 8ef3a5d 348935: d53a009 348927: 6164303
1 parent bbd1e00 commit 28970e1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: bb08667bf5fa6305491e2026bd123f422575c9c0
2+
refs/heads/master: ebbc9c837f5f209caed937dae636cbe9c523a01f
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/Parse/Parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ void Parser::skipSingle() {
755755
}
756756

757757
void Parser::ignoreToken() {
758+
assert(!Tok.is(tok::eof) && "Lexing eof token");
758759
ParsedTriviaList Skipped;
759760
Skipped.reserve(LeadingTrivia.size() + TrailingTrivia.size() + 1 + 2);
760761
std::move(LeadingTrivia.begin(), LeadingTrivia.end(),
@@ -764,7 +765,7 @@ void Parser::ignoreToken() {
764765
std::back_inserter(Skipped));
765766

766767
TokReceiver->receive(Tok);
767-
consumeTokenWithoutFeedingReceiver();
768+
L->lex(Tok, LeadingTrivia, TrailingTrivia);
768769

769770
std::move(LeadingTrivia.begin(), LeadingTrivia.end(),
770771
std::back_inserter(Skipped));

trunk/test/Parse/recovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ struct ErrorInFunctionSignatureResultArrayType5 {
511511

512512

513513
struct ErrorInFunctionSignatureResultArrayType11 { // expected-note{{in declaration of 'ErrorInFunctionSignatureResultArrayType11'}}
514-
func foo() -> Int[(a){a++}] { // expected-error {{consecutive declarations on a line must be separated by ';'}} {{21-21=;}} expected-error {{expected ']' in array type}} expected-note {{to match this opening '['}} expected-error {{expected '{' in body of function declaration}} expected-error {{expected declaration}}
514+
func foo() -> Int[(a){a++}] { // expected-error {{consecutive declarations on a line must be separated by ';'}} {{20-20=;}} expected-error {{expected ']' in array type}} expected-note {{to match this opening '['}} expected-error {{expected '{' in body of function declaration}} expected-error {{expected declaration}}
515515
}
516516
}
517517

0 commit comments

Comments
 (0)