From c76d63da11e8456422c0bd0fd3e38cfdad049e50 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 23 Jun 2015 11:11:02 +0200 Subject: Make trees have predictable hash codes. Simplifies debugging for me. --- src/dotty/tools/dotc/ast/Trees.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index f63d32b14..1fd1a5502 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -223,7 +223,7 @@ object Trees { override def toText(printer: Printer) = printer.toText(this) - override def hashCode(): Int = System.identityHashCode(this) + override def hashCode(): Int = uniqueId override def equals(that: Any) = this eq that.asInstanceOf[AnyRef] } -- cgit v1.2.3