File tree Expand file tree Collapse file tree 5 files changed +13
-7
lines changed
src/dotty/tools/dotc/parsing
test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 5 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ object Parsers {
194194 def isNumericLit = numericLitTokens contains in.token
195195 def isTemplateIntro = templateIntroTokens contains in.token
196196 def isDclIntro = dclIntroTokens contains in.token
197- def isStatSeqEnd = in.isNestedEnd || in.token == EOF
197+ def isStatSeqEnd = in.isNestedEnd || in.token == EOF || in.token == RPAREN
198198 def mustStartStat = mustStartStatTokens contains in.token
199199
200200 /** Is current token a hard or soft modifier (in modifier position or not)? */
Original file line number Diff line number Diff line change @@ -1274,7 +1274,7 @@ class ErrorMessagesTests extends ErrorMessagesTest {
12741274 checkMessagesAfter(FrontEnd .name) {
12751275 """
12761276 |object Test {
1277- | { ) }
1277+ | { with }
12781278 | { private ) }
12791279 |}
12801280 """ .stripMargin
Original file line number Diff line number Diff line change 1- object Foo {
2- val a = " " ); // error: end of statement expected
3- }
41// From #5824:
52object Main {
63 def main (args : Array [String ]): Unit = {
74 val foo = 123 " " ; // error: end of statement expected
85 println(foo)
96 }
10- }
7+ }
8+
9+ object Foo {
10+ val a = " " ); // error: `}` expected but `)` found
11+ } // error: eof expected
Original file line number Diff line number Diff line change 11class x0 {
22 def x0 : x0 = (x0 => x0) => x0) // error // error
3- // error
Original file line number Diff line number Diff line change 1+ @ main def Test =
2+ (
3+ try 1
4+ catch
5+ case _ : Throwable => 2
6+ )
You can’t perform that action at this time.
0 commit comments