diff options
author | Martin Odersky <odersky@gmail.com> | 2015-05-19 17:56:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-21 17:41:16 +0200 |
commit | 709c657b3963ec3d3d4f0933fe05bf25f697b48f (patch) | |
tree | a03327bc05640856fbff5e5d299c060e02456856 /src | |
parent | 53496b83e62b06435800d11069a64f529c29f03f (diff) | |
download | dotty-709c657b3963ec3d3d4f0933fe05bf25f697b48f.tar.gz dotty-709c657b3963ec3d3d4f0933fe05bf25f697b48f.tar.bz2 dotty-709c657b3963ec3d3d4f0933fe05bf25f697b48f.zip |
Add equals and hashcode to LazyRef
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index d5e0e3eba..792029ee4 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1787,6 +1787,11 @@ object Types { lazy val ref = refFn() override def underlying(implicit ctx: Context) = ref override def toString = s"LazyRef($ref)" + override def equals(other: Any) = other match { + case other: LazyRef => this.ref.equals(other.ref) + case _ => false + } + override def hashCode = ref.hashCode + 37 } // --- Refined Type --------------------------------------------------------- |