From a574ba6b70fc8a8dadf4ec493fcb5dc19d1fa478 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 31 Mar 2017 19:01:10 +0200 Subject: Further simplification for Name --- compiler/src/dotty/tools/dotc/core/NameOps.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/core/NameOps.scala') diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index 5a71c2bd2..ac4b296bb 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -63,9 +63,9 @@ object NameOps { def isConstructorName = name == CONSTRUCTOR || name == TRAIT_CONSTRUCTOR def isStaticConstructorName = name == STATIC_CONSTRUCTOR - def isLocalDummyName = name startsWith LOCALDUMMY_PREFIX + def isLocalDummyName = name startsWith str.LOCALDUMMY_PREFIX def isReplWrapperName = name.toString contains str.INTERPRETER_IMPORT_WRAPPER - def isSetterName = name endsWith SETTER_SUFFIX + def isSetterName = name endsWith str.SETTER_SUFFIX def isScala2LocalSuffix = testSimple(_.endsWith(" ")) def isSelectorName = testSimple(n => n.startsWith("_") && n.drop(1).forall(_.isDigit)) @@ -275,7 +275,7 @@ object NameOps { def getterName: TermName = name.exclude(FieldName).mapLast(n => - if (n.endsWith(SETTER_SUFFIX)) n.take(n.length - str.SETTER_SUFFIX.length).asSimpleName + if (n.endsWith(str.SETTER_SUFFIX)) n.take(n.length - str.SETTER_SUFFIX.length).asSimpleName else n) def fieldName: TermName = -- cgit v1.2.3