XWZ's answer helped me too. Thanks.
Thought it was worth adding the compatibility chart here: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
I was using Scala 2.13.0, but using JDK 17, so got the error. Once I switched to JDK 8, REPL worked fine