Skip to content

Commit e00dd1c

Browse files
BlaisorbladeOlivierBlanvillain
authored andcommitted
Fix scala#4393 WIP
Min tests: `try { ??? } catch {}` (can be scripted) and `try { ??? } catch {`.
1 parent a7b67c4 commit e00dd1c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,10 @@ object Parsers {
12591259
if (in.token == CATCH) {
12601260
val span = in.offset
12611261
in.nextToken()
1262-
(expr(), span)
1262+
accept(LBRACE)
1263+
val res = (expr(), span)
1264+
accept(RBRACE)
1265+
res
12631266
} else (EmptyTree, -1)
12641267

12651268
handler match {

0 commit comments

Comments
 (0)