Skip to content

Commit ca46e49

Browse files
committed
Drop unused operations in NameHandler
Also, fix a discrepancy in the signature of newWeakSet # Conflicts: # scala-backend
1 parent 8775dd1 commit ca46e49

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
404404
def newAnyRefMap[K <: AnyRef, V](): mutable.AnyRefMap[K, V] = new mutable.AnyRefMap[K, V]()
405405
def newWeakMap[K, V](): mutable.WeakHashMap[K, V] = new mutable.WeakHashMap[K, V]()
406406
def recordCache[T <: Clearable](cache: T): T = cache
407-
def newWeakSet[K <: AnyRef](): WeakHashSet[K] = new WeakHashSet[K]()
407+
def newWeakSet[K >: Null <: AnyRef](): WeakHashSet[K] = new WeakHashSet[K]()
408408
def newMap[K, V](): mutable.HashMap[K, V] = new mutable.HashMap[K, V]()
409409
def newSet[K](): mutable.Set[K] = new mutable.HashSet[K]
410410
}
@@ -540,15 +540,10 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
540540
def toTypeName: Name = n.toTypeName
541541
def isTypeName: Boolean = n.isTypeName
542542
def toTermName: Name = n.toTermName
543-
def dropModule: Name = n.stripModuleClassSuffix
544-
545-
def len: Int = n.toSimpleName.length
546-
def offset: Int = n.toSimpleName.start
547543
def isTermName: Boolean = n.isTermName
548544
def startsWith(s: String): Boolean = n.startsWith(s)
549545
}
550546

551-
552547
implicit def symHelper(sym: Symbol): SymbolHelper = new SymbolHelper {
553548
// names
554549
def fullName(sep: Char): String = sym.showFullName

0 commit comments

Comments
 (0)