diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-15 17:37:11 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-17 18:39:36 +0100 |
commit | bb60d3c43bd42d24b54d5cad0dcfdb50cbdd5782 (patch) | |
tree | 2dc3fe8a83a0777c0de4bf04f137964ba006821a | |
parent | 4f1938809c94660984b59720232d4ef0e4048687 (diff) | |
download | dotty-bb60d3c43bd42d24b54d5cad0dcfdb50cbdd5782.tar.gz dotty-bb60d3c43bd42d24b54d5cad0dcfdb50cbdd5782.tar.bz2 dotty-bb60d3c43bd42d24b54d5cad0dcfdb50cbdd5782.zip |
Turn cleaning on for interpreter generated messages
Avoids line$object... gunk.
-rw-r--r-- | src/dotty/tools/dotc/repl/CompilingInterpreter.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/repl/CompilingInterpreter.scala b/src/dotty/tools/dotc/repl/CompilingInterpreter.scala index f60b3c000..954612f1d 100644 --- a/src/dotty/tools/dotc/repl/CompilingInterpreter.scala +++ b/src/dotty/tools/dotc/repl/CompilingInterpreter.scala @@ -93,7 +93,13 @@ class CompilingInterpreter(out: PrintWriter, ictx: Context) extends Compiler wit private def newReporter = new ConsoleReporter(Console.in, out) { override def printMessage(msg: String) = { - out.print(clean(msg) + "\n") + out.print(/*clean*/(msg) + "\n") + // Suppress clean for now for compiler messages + // Otherwise we will completely delete all references to + // line$object$ module classes. The previous interpreter did not + // have the project because the module class was written without the final `$' + // and therefore escaped the purge. We can turn this back on once + // we drop the final `$' from module classes. out.flush() } } @@ -752,8 +758,8 @@ class CompilingInterpreter(out: PrintWriter, ictx: Context) extends Compiler wit } /** Clean up a string for output */ - private def clean(str: String) = str - // truncPrintString(stripWrapperGunk(str)) // TODO: enable + private def clean(str: String) = + truncPrintString(stripWrapperGunk(str)) /** Indent some code by the width of the scala> prompt. * This way, compiler error messages read better. |