From 21948a58c0c47363addf0dd87f1527e9b0aec76f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 16 Nov 2015 13:02:49 +0100 Subject: 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). --- src/dotty/tools/dotc/core/NameOps.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dotty/tools/dotc/core/NameOps.scala') 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 && { -- cgit v1.2.3