Skip to content

Commit 04b1253

Browse files
committed
Make symbols have predictable hash codes.
1 parent ef536f0 commit 04b1253

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
@@ -503,6 +503,8 @@ object Symbols {
503503
def showKind(implicit ctx: Context): String = ctx.kindString(this)
504504
def showName(implicit ctx: Context): String = ctx.nameString(this)
505505
def showFullName(implicit ctx: Context): String = ctx.fullNameString(this)
506+
507+
override def hashCode(): PhaseId = id
506508
}
507509

508510
type TermSymbol = Symbol { type ThisName = TermName }

0 commit comments

Comments
 (0)