aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-16 13:02:49 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-14 14:30:10 +0100
commit21948a58c0c47363addf0dd87f1527e9b0aec76f (patch)
treef31875062117d58977fdd1d0432722f89c56bd9e /src/dotty/tools/dotc/core/NameOps.scala
parent0a19b0b94393e47865f21f714e82676a67ab2e4d (diff)
downloaddotty-21948a58c0c47363addf0dd87f1527e9b0aec76f.tar.gz
dotty-21948a58c0c47363addf0dd87f1527e9b0aec76f.tar.bz2
dotty-21948a58c0c47363addf0dd87f1527e9b0aec76f.zip
Generalize overriding checking from isDefined
Generalize overriding checking from isDefined to all methods added by desugar to a case class. None of these methods has an override so we need to add one in case they do override another method (previously we would flag this as an error).
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/NameOps.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala
index 7dbd492b4..6c1930c9f 100644
--- a/src/dotty/tools/dotc/core/NameOps.scala
+++ b/src/dotty/tools/dotc/core/NameOps.scala
@@ -81,6 +81,7 @@ object NameOps {
def isScala2LocalSuffix = name.endsWith(" ")
def isModuleVarName(name: Name): Boolean =
name.stripAnonNumberSuffix endsWith MODULE_VAR_SUFFIX
+ def isSelectorName = name.startsWith(" ") && name.tail.forall(_.isDigit)
/** Is name a variable name? */
def isVariableName: Boolean = name.length > 0 && {