Does the scala repl support comments in :paste mode?
I’m just starting out with scala and was suprised by this interaction:
scala> :paste // Entering paste mode (ctrl-D to finish) // This is a comment val x = 1 // Exiting paste mode, now interpreting. scala> x ^ error: not found: value x
If I do the same thing without the comment before the
val x = 1 line,
x is defined as expected. Not sure why there’s no error message when the comment is there.
I am running scala version:
Scala code runner version 2.13.2 – Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.