summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Interpreter.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/Interpreter.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index 99606e856f..635f01fa7a 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -622,13 +622,10 @@ class Interpreter(val settings: Settings, out: PrintWriter) {
code.print(" + \"" + prettyName + ": " +
string2code(req.typeOf(vname)) +
" = \" + " +
- " (if(" +
+ " { val tmp = scala.runtime.ScalaRunTime.stringOf(" +
req.fullPath(vname) +
- ".asInstanceOf[AnyRef] != null) " +
- " { val tmp = " +
- req.fullPath(vname) +
- ".toString(); " +
- " (if(tmp.contains('\\n')) \"\\n\" else \"\") + tmp + \"\\n\"} else \"null\\n\") ")
+ "); " +
+ " (if(tmp.contains('\\n')) \"\\n\" else \"\") + tmp + \"\\n\"} ")
}
}
}