@@ -5,6 +5,7 @@ import java.nio.charset.StandardCharsets
55
66import dotty .tools .dotc .ast .Trees ._
77import dotty .tools .dotc .ast .{tpd , untpd }
8+ import dotty .tools .dotc .config .Properties .{javaVersion , javaVmName , simpleVersionString }
89import dotty .tools .dotc .core .Contexts ._
910import dotty .tools .dotc .core .Phases .{unfusedPhases , typerPhase }
1011import dotty .tools .dotc .core .Denotations .Denotation
@@ -124,6 +125,10 @@ class ReplDriver(settings: Array[String],
124125 final def runUntilQuit (initialState : State = initialState): State = {
125126 val terminal = new JLineTerminal
126127
128+ out.println(
129+ s """ Welcome to Scala $simpleVersionString ( $javaVersion, Java $javaVmName).
130+ |Type in expressions for evaluation. Or try :help. """ .stripMargin)
131+
127132 /** Blockingly read a line, getting back a parse result */
128133 def readLine (state : State ): ParseResult = {
129134 val completer : Completer = { (_, line, candidates) =>
@@ -208,7 +213,7 @@ class ReplDriver(settings: Array[String],
208213 }
209214
210215 private def interpret (res : ParseResult )(implicit state : State ): State = {
211- val newState = res match {
216+ res match {
212217 case parsed : Parsed if parsed.trees.nonEmpty =>
213218 compile(parsed, state)
214219
@@ -225,11 +230,6 @@ class ReplDriver(settings: Array[String],
225230 case _ => // new line, empty tree
226231 state
227232 }
228- inContext(newState.context) {
229- if (! ctx.settings.XreplDisableDisplay .value)
230- out.println()
231- newState
232- }
233233 }
234234
235235 /** Compile `parsed` trees and evolve `state` in accordance */
0 commit comments