Skip to content

Commit 495029c

Browse files
OndrejSpanelpeteraldous
authored andcommitted
Provide explicit type to Scanner.rest
Without this Scala 3 infers different type than Scala 2
1 parent 79c6008 commit 495029c

File tree

1 file changed

+1
-1
lines changed
  • shared/src/main/scala/scala/util/parsing/combinator/lexical

1 file changed

+1
-1
lines changed

shared/src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ trait Scanners extends Parsers {
5151
override def source: java.lang.CharSequence = in.source
5252
override def offset: Int = in.offset
5353
def first = tok
54-
def rest = new Scanner(rest2)
54+
def rest: Scanner = new Scanner(rest2)
5555
def pos = rest1.pos
5656
def atEnd = in.atEnd || skip(in).atEnd
5757
}

0 commit comments

Comments
 (0)