diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-17 14:01:32 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-03-18 12:22:46 +0100 |
commit | f08c741efb6b64d6df7bd02b5191617037f6be12 (patch) | |
tree | cf15e0f139de56548404a70a0a6e7f9797393c0f /src | |
parent | a1a4b9847e3b3d1f63d5c04c57f561708d009a34 (diff) | |
download | dotty-f08c741efb6b64d6df7bd02b5191617037f6be12.tar.gz dotty-f08c741efb6b64d6df7bd02b5191617037f6be12.tar.bz2 dotty-f08c741efb6b64d6df7bd02b5191617037f6be12.zip |
Fix handling of imports in REPL.
They printed as raw trees which confused the REPL
when wrapping subsequent liens with them.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/repl/CompilingInterpreter.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/repl/CompilingInterpreter.scala b/src/dotty/tools/dotc/repl/CompilingInterpreter.scala index dd7189ddf..a7d3fbc1c 100644 --- a/src/dotty/tools/dotc/repl/CompilingInterpreter.scala +++ b/src/dotty/tools/dotc/repl/CompilingInterpreter.scala @@ -479,7 +479,7 @@ class CompilingInterpreter(out: PrintWriter, ictx: Context) extends Compiler wit addWrapper() if (handler.statement.isInstanceOf[Import]) - preamble.append(handler.statement.toString + ";\n") + preamble.append(handler.statement.show + ";\n") // give wildcard imports a import wrapper all to their own if (handler.importsWildcard) @@ -647,7 +647,7 @@ class CompilingInterpreter(out: PrintWriter, ictx: Context) extends Compiler wit private class ImportHandler(imp: Import) extends StatementHandler(imp) { override def resultExtractionCode(req: Request, code: PrintWriter): Unit = { - code.println("+ \"" + imp.toString + "\\n\"") + code.println("+ \"" + imp.show + "\\n\"") } def isWildcardSelector(tree: Tree) = tree match { |