diff options
author | Paul Phillips <paulp@improving.org> | 2011-09-15 20:32:48 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-09-15 20:32:48 +0000 |
commit | 3b357972e911aed24842f4c2229058b4a1311d1b (patch) | |
tree | 373369e510f69336a90f86ab57a989aad3bf7949 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 09b1a31309c9cbf1394c317b87d2073d39a8cd56 (diff) | |
download | scala-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/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index dcc0b1c6ac..5106d7a4e6 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1479,7 +1479,7 @@ trait Typers extends Modes with Adaptations { } if (!forMSIL && (value.hasAnnotation(BeanPropertyAttr) || value.hasAnnotation(BooleanBeanPropertyAttr))) { - val nameSuffix = name.toString().capitalize + val nameSuffix = name.toString.capitalize val beanGetterName = (if (value.hasAnnotation(BooleanBeanPropertyAttr)) "is" else "get") + nameSuffix |