diff options
author | mihaylov <mihaylov@epfl.ch> | 2006-07-05 08:22:56 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2006-07-05 08:22:56 +0000 |
commit | fb129da2516f17f1e28434561c1d921b11a04598 (patch) | |
tree | 0490ad37a89c9ab88d063830cd2c11e135773d3c | |
parent | 7d9e8c17bfb169305e4990628de20f2aafeb6bdb (diff) | |
download | scala-fb129da2516f17f1e28434561c1d921b11a04598.tar.gz scala-fb129da2516f17f1e28434561c1d921b11a04598.tar.bz2 scala-fb129da2516f17f1e28434561c1d921b11a04598.zip |
Prefix boolean Bean properties with 'is' instea...
Prefix boolean Bean properties with 'is' instead of 'get'
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala index 896fdcc481..12a289d662 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala @@ -137,7 +137,8 @@ trait SyntheticMethods requires Analyzer { } else { var name0 = sym.name if (sym.isSetter) name0 = nme.setterToGetter(name0) - val prefix = if (sym.isSetter) "set" else "get" + val prefix = if (sym.isSetter) "set" else + if (sym.tpe.resultType == BooleanClass.tpe) "is" else "get" val arity = if (sym.isSetter) 1 else 0 val name1 = prefix + Character.toUpperCase(name0(0)) + name0.subName(1, name0.length) val sym1 = clazz.info.decl(name1) |