aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-31 19:01:10 +0200
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:12 +0200
commita574ba6b70fc8a8dadf4ec493fcb5dc19d1fa478 (patch)
tree6203155dd48e40d5a56a5fa458660c6ee903427e /compiler/src/dotty/tools/dotc/core/NameOps.scala
parent4a54b2c24d6f6feb5864461697f5872df220ba52 (diff)
downloaddotty-a574ba6b70fc8a8dadf4ec493fcb5dc19d1fa478.tar.gz
dotty-a574ba6b70fc8a8dadf4ec493fcb5dc19d1fa478.tar.bz2
dotty-a574ba6b70fc8a8dadf4ec493fcb5dc19d1fa478.zip
Further simplification for Name
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/NameOps.scala6
1 files changed, 3 insertions, 3 deletions
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 =