Skip to content

Commit f2cdf82

Browse files
committed
Make trees have predictable hash codes.
Simplifies debugging for me.
1 parent c481fbf commit f2cdf82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ object Trees {
222222

223223
override def toText(printer: Printer) = printer.toText(this)
224224

225-
override def hashCode(): Int = System.identityHashCode(this)
225+
override def hashCode(): Int = uniqueId
226226
override def equals(that: Any) = this eq that.asInstanceOf[AnyRef]
227227
}
228228

0 commit comments

Comments
 (0)