From b355fb2c7f622c2d263c43864469b862ef0bc768 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 13 Jul 2012 12:09:16 -0700 Subject: 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. --- src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala') 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) -- cgit v1.2.3