aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-11-08 09:40:19 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-09 19:09:51 +0100
commitc67d6cf46cee95d8fab4375fa146877a11321d8d (patch)
tree87dc35b4989daa0d164f11cf981230b3ad478b21 /src/dotty/tools/dotc/core/NameOps.scala
parentf618e471b3f4f035221234cfeb980e52cc283701 (diff)
downloaddotty-c67d6cf46cee95d8fab4375fa146877a11321d8d.tar.gz
dotty-c67d6cf46cee95d8fab4375fa146877a11321d8d.tar.bz2
dotty-c67d6cf46cee95d8fab4375fa146877a11321d8d.zip
More systematic handling of Scala2LocalSuffix.
Separate test instead of inline.
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/NameOps.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala
index 299ead580..bc15f6a06 100644
--- a/src/dotty/tools/dotc/core/NameOps.scala
+++ b/src/dotty/tools/dotc/core/NameOps.scala
@@ -76,7 +76,7 @@ object NameOps {
def isFieldName = name endsWith LOCAL_SUFFIX
def isInheritedName = name.length > 0 && name.head == '(' && name.startsWith(nme.INHERITED)
def isDefaultGetterName = name.isTermName && name.asTermName.defaultGetterIndex >= 0
-
+ def isScala2LocalSuffix = name.endsWith(" ")
def isModuleVarName(name: Name): Boolean =
name.stripAnonNumberSuffix endsWith MODULE_VAR_SUFFIX
@@ -277,7 +277,7 @@ object NameOps {
}
def stripScala2LocalSuffix: TermName =
- if (name.endsWith(" ")) name.init.asTermName else name
+ if (name.isScala2LocalSuffix) name.init.asTermName else name
/** The name of an accessor for protected symbols. */
def protectedAccessorName: TermName =