summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interactive/Picklers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-09-15 20:32:48 +0000
committerPaul Phillips <paulp@improving.org>2011-09-15 20:32:48 +0000
commit3b357972e911aed24842f4c2229058b4a1311d1b (patch)
tree373369e510f69336a90f86ab57a989aad3bf7949 /src/compiler/scala/tools/nsc/interactive/Picklers.scala
parent09b1a31309c9cbf1394c317b87d2073d39a8cd56 (diff)
downloadscala-3b357972e911aed24842f4c2229058b4a1311d1b.tar.gz
scala-3b357972e911aed24842f4c2229058b4a1311d1b.tar.bz2
scala-3b357972e911aed24842f4c2229058b4a1311d1b.zip
Removed parens from calls to Name#toString.
This commit doesn't include the line which would change anything interesting (that being making toString in Name a val), it is all the changes elsewhere which one would have to make to do that. I didn't want to waste them. A quirk of scala is that if you call an empty-parameter-list method: foo.bar() // e.g. x.toString() foo.bar // where you could have called x.toString then if you decide in the future to make it a val, every call site must potentially be modified. This is a bit of a bummer. One can try to defend against that future decision by eschewing parentheses, but it's not very satisfying or effective. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interactive/Picklers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Picklers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Picklers.scala b/src/compiler/scala/tools/nsc/interactive/Picklers.scala
index 561fa47e94..2b6e793c5c 100644
--- a/src/compiler/scala/tools/nsc/interactive/Picklers.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Picklers.scala
@@ -85,7 +85,7 @@ trait Picklers { self: Global =>
implicit lazy val position: Pickler[Position] = transparentPosition | rangePosition | offsetPosition | noPosition
implicit lazy val namePickler: Pickler[Name] =
- pkl[String] .wrapped {
+ pkl[String] .wrapped[Name] {
str => if ((str.length > 1) && (str endsWith "!")) newTypeName(str.init) else newTermName(str)
} {
name => if (name.isTypeName) name.toString+"!" else name.toString