aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-11-01 10:27:21 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-09 19:08:58 +0100
commit7c5a3ff5c5d5bc8844d981f55c3e2152976a42ac (patch)
tree5342dbcd6069af5dfffc3efb815eb852274b7432 /src/dotty/tools/dotc/core/NameOps.scala
parent31d299451204fe7feddb392f54d2fc2d6463fe2e (diff)
downloaddotty-7c5a3ff5c5d5bc8844d981f55c3e2152976a42ac.tar.gz
dotty-7c5a3ff5c5d5bc8844d981f55c3e2152976a42ac.tar.bz2
dotty-7c5a3ff5c5d5bc8844d981f55c3e2152976a42ac.zip
Adapt GettersSetters to new Mixin scheme.
Trait getters are no longer needed.
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/NameOps.scala13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala
index 752d9bcea..56f292b87 100644
--- a/src/dotty/tools/dotc/core/NameOps.scala
+++ b/src/dotty/tools/dotc/core/NameOps.scala
@@ -70,7 +70,6 @@ object NameOps {
def isProtectedAccessorName = name startsWith PROTECTED_PREFIX
def isReplWrapperName = name containsSlice INTERPRETER_IMPORT_WRAPPER
def isSetterName = name endsWith SETTER_SUFFIX
- def isTraitSetterName = isSetterName && (name containsSlice TRAIT_SETTER_PREFIX)
def isSingletonName = name endsWith SINGLETON_SUFFIX
def isModuleClassName = name endsWith MODULE_SUFFIX
def isImportName = name startsWith IMPORT
@@ -226,9 +225,6 @@ object NameOps {
implicit class TermNameDecorator(val name: TermName) extends AnyVal {
import nme._
- def traitSetterName: TermName =
- nme.TRAIT_SETTER_PREFIX ++ setterName
-
def setterName: TermName =
if (name.isFieldName) name.fieldToGetter.setterName
else name ++ SETTER_SUFFIX
@@ -242,13 +238,8 @@ object NameOps {
else name ++ LOCAL_SUFFIX
private def setterToGetter: TermName = {
- val p = name.indexOfSlice(TRAIT_SETTER_PREFIX)
- if (p >= 0)
- (name drop (p + TRAIT_SETTER_PREFIX.length)).asTermName.getterName
- else {
- assert(name.endsWith(SETTER_SUFFIX), name + " is referenced as a setter but has wrong name format")
- name.take(name.length - SETTER_SUFFIX.length).asTermName
- }
+ assert(name.endsWith(SETTER_SUFFIX), name + " is referenced as a setter but has wrong name format")
+ name.take(name.length - SETTER_SUFFIX.length).asTermName
}
def fieldToGetter: TermName = {