aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/repl/InterpreterLoop.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-04-27 14:31:17 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-04-28 11:00:40 +0200
commit4d53d338e59beb240716508e0b6d32c182a17df6 (patch)
tree49c9005738ac55aa7e8a104fd9c6deccaf6c8766 /src/dotty/tools/dotc/repl/InterpreterLoop.scala
parentd1ec1407b88f70f4172ad48163f6c7e677a38958 (diff)
downloaddotty-4d53d338e59beb240716508e0b6d32c182a17df6.tar.gz
dotty-4d53d338e59beb240716508e0b6d32c182a17df6.tar.bz2
dotty-4d53d338e59beb240716508e0b6d32c182a17df6.zip
Fix error messages not being doubled and being on a new line
Diffstat (limited to 'src/dotty/tools/dotc/repl/InterpreterLoop.scala')
-rw-r--r--src/dotty/tools/dotc/repl/InterpreterLoop.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/repl/InterpreterLoop.scala b/src/dotty/tools/dotc/repl/InterpreterLoop.scala
index 98e47b635..c6c750b56 100644
--- a/src/dotty/tools/dotc/repl/InterpreterLoop.scala
+++ b/src/dotty/tools/dotc/repl/InterpreterLoop.scala
@@ -167,10 +167,10 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
output.println("Unknown command. Type :help for help.")
else
shouldReplay = interpreter.lastOutput() match { // don't interpret twice
- case Some(oldRes) =>
- output.print(oldRes)
+ case Nil => interpretStartingWith(line)
+ case oldRes =>
+ oldRes foreach output.print
Some(line)
- case None => interpretStartingWith(line)
}
(true, shouldReplay)