Skip to content

Commit 46bb161

Browse files
committed
Allow EmptyTrees in extensions
1 parent e4cb221 commit 46bb161

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,6 +3486,7 @@ object Parsers {
34863486
stat.tparams.head.span)
34873487
else if stat.rhs.isEmpty then
34883488
syntaxError(i"extension method cannot be abstract", stat.span)
3489+
case EmptyTree =>
34893490
case stat =>
34903491
syntaxError(i"extension clause can only define methods", stat.span)
34913492
}

0 commit comments

Comments
 (0)