Skip to content

Commit eec5deb

Browse files
committed
Make symbols have predictable hash codes.
1 parent e873017 commit eec5deb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ object Symbols {
509509
def showKind(implicit ctx: Context): String = ctx.kindString(this)
510510
def showName(implicit ctx: Context): String = ctx.nameString(this)
511511
def showFullName(implicit ctx: Context): String = ctx.fullNameString(this)
512+
513+
override def hashCode(): PhaseId = id
512514
}
513515

514516
type TermSymbol = Symbol { type ThisName = TermName }

0 commit comments

Comments
 (0)