@@ -57,15 +57,13 @@ object NameOps {
5757
5858 def isConstructorName = name == CONSTRUCTOR || name == TRAIT_CONSTRUCTOR
5959 def isStaticConstructorName = name == STATIC_CONSTRUCTOR
60- def isImplClassName = name endsWith IMPL_CLASS_SUFFIX
6160 def isLocalDummyName = name startsWith LOCALDUMMY_PREFIX
6261 def isReplWrapperName = name.toSimpleName containsSlice INTERPRETER_IMPORT_WRAPPER
6362 def isSetterName = name endsWith SETTER_SUFFIX
6463 def isImportName = name startsWith IMPORT
6564 def isScala2LocalSuffix = name.endsWith(" " )
66- def isModuleVarName (name : Name ): Boolean =
67- name.stripAnonNumberSuffix endsWith MODULE_VAR_SUFFIX
68- def isSelectorName = name.startsWith(" " ) && name.tail.forall(_.isDigit)
65+ def isModuleVarName (name : Name ): Boolean = name.exclude(UniqueName ).is(ModuleVarName )
66+ def isSelectorName = name.startsWith(" _" ) && name.tail.forall(_.isDigit)
6967 def isOuterSelect = name.endsWith(nme.OUTER_SELECT )
7068
7169 /** Is name a variable name? */
@@ -86,21 +84,6 @@ object NameOps {
8684 false
8785 }
8886
89- /** If the name ends with $nn where nn are
90- * all digits, strip the $ and the digits.
91- * Otherwise return the argument.
92- */
93- def stripAnonNumberSuffix : Name = {
94- var pos = name.length
95- while (pos > 0 && name(pos - 1 ).isDigit)
96- pos -= 1
97-
98- if (pos > 0 && pos < name.length && name(pos - 1 ) == '$' )
99- name take (pos - 1 )
100- else
101- name
102- }
103-
10487 /** Convert this module name to corresponding module class name */
10588 def moduleClassName : TypeName = name.derived(ModuleClassName ).toTypeName
10689
@@ -345,9 +328,6 @@ object NameOps {
345328 def stripScala2LocalSuffix : TermName =
346329 if (name.isScala2LocalSuffix) name.init.asTermName else name
347330
348- def moduleVarName : TermName =
349- name ++ MODULE_VAR_SUFFIX
350-
351331 /** The name unary_x for a prefix operator x */
352332 def toUnaryName : TermName = name match {
353333 case raw.MINUS => UNARY_-
0 commit comments