Map on parallel range

I am using parallel collections in Scala 2.12.3. When I run the following code using the interactive Scala shell:
0.until(10) => x+1)
it does not terminate, but the following code terminates and returns the correct result:
0.until(10).map(x => x+1).par
Both work correctly in compiled Scala.
Is this a bug? Of course I can always use the latter but the former should also work.

According to try providing repl-class-based flag

scala -Yrepl-class-based

If you are using sbt console then according to try

sbt 'set Compile/console/scalacOptions += "-Yrepl-class-based"' console

I believe since Scala 2.13.2 has the flag set by default so it should work out-of-the box.