aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Names.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Names.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Names.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Names.scala b/compiler/src/dotty/tools/dotc/core/Names.scala
index 37df9cd24..d1412c35c 100644
--- a/compiler/src/dotty/tools/dotc/core/Names.scala
+++ b/compiler/src/dotty/tools/dotc/core/Names.scala
@@ -105,6 +105,7 @@ object Names {
def lastIndexOfSlice(str: String): Int = lastPart.toString.lastIndexOfSlice(str)
def lastIndexOfSlice(name: Name): Int = lastIndexOfSlice(name.toString)
+ override def hashCode = System.identityHashCode(this)
override def equals(that: Any) = this eq that.asInstanceOf[AnyRef]
}
@@ -196,9 +197,6 @@ object Names {
thisKind == kind ||
!thisKind.definesNewName && thisKind.tag > kind.tag && underlying.is(kind)
}
-
- override def hashCode = System.identityHashCode(this)
- override def equals(other: Any) = this eq other.asInstanceOf[AnyRef]
}
class SimpleTermName(val start: Int, val length: Int, @sharable private[Names] var next: SimpleTermName) extends TermName {