Skip to content

Commit 0f91408

Browse files
committed
Fix interpret dummy line before prompt displayed
1 parent 57670a3 commit 0f91408

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/dotty/tools/dotc/repl/InterpreterLoop.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
7474
* line of input to be entered.
7575
*/
7676
def firstLine(): String = {
77-
val line = in.readLine(prompt)
7877
interpreter.beQuietDuring(
7978
interpreter.interpret("val theAnswerToLifeInTheUniverseAndEverything = 21 * 2"))
80-
line
79+
in.readLine(prompt)
8180
}
8281

8382
/** The main read-eval-print loop for the interpreter. It calls
@@ -171,7 +170,7 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
171170
case Some(oldRes) =>
172171
output.print(oldRes)
173172
Some(line)
174-
case _ => interpretStartingWith(line)
173+
case None => interpretStartingWith(line)
175174
}
176175

177176
(true, shouldReplay)

0 commit comments

Comments
 (0)