summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-10-18 21:32:45 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-10-18 21:32:45 +0000
commit08a8c00be622e1ec685a2c406a23bb25f4e2bd88 (patch)
tree4a08fa05367f46d92de55c24dbb4d7cf182ab8f0 /src/compiler
parentb2e8634221054e1f0bc989c8c165aafa30e0528b (diff)
downloadscala-08a8c00be622e1ec685a2c406a23bb25f4e2bd88.tar.gz
scala-08a8c00be622e1ec685a2c406a23bb25f4e2bd88.tar.bz2
scala-08a8c00be622e1ec685a2c406a23bb25f4e2bd88.zip
Added stringOf to ScalaRunTime.
Fixed deepToString to put spaces after commas (like regular Array toString, and List, etc.). Fixed all the test cases depending on this. Fixed the interpreter to keep my mind from wandering.
Diffstat (limited to 'src/compiler')
-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\"} ")
}
}
}