summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-07-13 12:09:16 -0700
committerPaul Phillips <paulp@improving.org>2012-07-13 12:25:08 -0700
commitb355fb2c7f622c2d263c43864469b862ef0bc768 (patch)
tree2f47f42921a20c8e4e7b85229e793caa2c236001 /src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
parent453b7068ed4294eef18bf10a321a5b63497c7466 (diff)
downloadscala-b355fb2c7f622c2d263c43864469b862ef0bc768.tar.gz
scala-b355fb2c7f622c2d263c43864469b862ef0bc768.tar.bz2
scala-b355fb2c7f622c2d263c43864469b862ef0bc768.zip
Avoid conflict with String's apply.
This brought to light that Name extends (Int => Char), and that small convenience was not paying for itself. I updated the places taking advantage of it to use Name#charAt.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala b/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
index 95d0369707..7bd5f4caeb 100644
--- a/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
@@ -540,7 +540,7 @@ trait MethodSynthesis {
val ValDef(mods, name, _, _) = tree
val beans = beanAccessorsFromNames(tree)
if (beans.nonEmpty) {
- if (!name(0).isLetter)
+ if (!name.charAt(0).isLetter)
BeanPropertyAnnotationFieldWithoutLetterError(tree)
else if (mods.isPrivate) // avoids name clashes with private fields in traits
BeanPropertyAnnotationPrivateFieldError(tree)