diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-06-23 11:11:02 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-07-13 15:31:15 +0200 |
commit | c76d63da11e8456422c0bd0fd3e38cfdad049e50 (patch) | |
tree | 0d0a7799cf58249a7c46a1aaf2f82b1a0601ae8e | |
parent | 74c2e2326f6a68a889347ef3052d88a586aca84f (diff) | |
download | dotty-c76d63da11e8456422c0bd0fd3e38cfdad049e50.tar.gz dotty-c76d63da11e8456422c0bd0fd3e38cfdad049e50.tar.bz2 dotty-c76d63da11e8456422c0bd0fd3e38cfdad049e50.zip |
Make trees have predictable hash codes.
Simplifies debugging for me.
-rw-r--r-- | src/dotty/tools/dotc/ast/Trees.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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] } |