diff --git a/compiler/src/dotty/tools/repl/ReplDriver.scala b/compiler/src/dotty/tools/repl/ReplDriver.scala index b2f0f834434a..138f5b032f7c 100644 --- a/compiler/src/dotty/tools/repl/ReplDriver.scala +++ b/compiler/src/dotty/tools/repl/ReplDriver.scala @@ -132,7 +132,10 @@ class ReplDriver(settings: Array[String], @tailrec final def runUntilQuit(state: State = initState): State = { val res = readLine()(state) - if (res == Quit) state + if (res == Quit) { + out.println() + state + } else { // readLine potentially destroys the run, so a new one is needed for the // rest of the interpretation: