File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ object NameOps {
6969 def isSetterName : Boolean = name endsWith str.SETTER_SUFFIX
7070 def isScala2LocalSuffix : Boolean = testSimple(_.endsWith(" " ))
7171 def isSelectorName : Boolean = testSimple(n => n.startsWith(" _" ) && n.drop(1 ).forall(_.isDigit))
72+ def isAnonymousClassName : Boolean = name.startsWith(str.ANON_CLASS )
73+ def isAnonymousFunctionName : Boolean = name.startsWith(str.ANON_FUN )
7274
7375 /** Is name a variable name? */
7476 def isVariableName : Boolean = testSimple { n =>
Original file line number Diff line number Diff line change @@ -484,13 +484,13 @@ object SymDenotations {
484484
485485 /** Is this symbol an anonymous class? */
486486 final def isAnonymousClass (implicit ctx : Context ): Boolean =
487- isClass && ( initial.name startsWith str. ANON_CLASS )
487+ isClass && initial.name.isAnonymousClassName
488488
489489 final def isAnonymousFunction (implicit ctx : Context ): Boolean =
490- this .symbol.is(Method ) && ( initial.name startsWith str. ANON_FUN )
490+ this .symbol.is(Method ) && initial.name.isAnonymousFunctionName
491491
492492 final def isAnonymousModuleVal (implicit ctx : Context ): Boolean =
493- this .symbol.is(ModuleVal ) && ( initial.name startsWith str. ANON_CLASS )
493+ this .symbol.is(ModuleVal ) && initial.name.isAnonymousClassName
494494
495495 /** Is this a synthetic method that represents conversions between representations of a value class
496496 * These methods are generated in ExtensionMethods
You can’t perform that action at this time.
0 commit comments