summaryrefslogtreecommitdiff
path: root/test/files/run/equality.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-03-19 21:48:42 +0000
committerPaul Phillips <paulp@improving.org>2010-03-19 21:48:42 +0000
commit6613b1cdae66ae23edfd0e20eb5d4d066018681d (patch)
treec033a214a3d7e15ca01cdf778b88ac6e026c0fb7 /test/files/run/equality.scala
parentf2be3e6836014b3e4db9c7eca3bb4da8ab447f89 (diff)
downloadscala-6613b1cdae66ae23edfd0e20eb5d4d066018681d.tar.gz
scala-6613b1cdae66ae23edfd0e20eb5d4d066018681d.tar.bz2
scala-6613b1cdae66ae23edfd0e20eb5d4d066018681d.zip
Returning to the thrilling world of equality an...
Returning to the thrilling world of equality and hashCodes now that Any.## is a reality. Moved the hash functions from Predef to ScalaRunTime, and made what appears to be an optimization to equals by not losing the result of an instanceof test. Review by community.
Diffstat (limited to 'test/files/run/equality.scala')
-rw-r--r--test/files/run/equality.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/files/run/equality.scala b/test/files/run/equality.scala
index 5b9ad207da..6498b232e1 100644
--- a/test/files/run/equality.scala
+++ b/test/files/run/equality.scala
@@ -1,6 +1,8 @@
// a quickly assembled test of equality. Needs work.
object Test
{
+ import scala.runtime.ScalaRunTime.hash
+
def makeFromInt(x: Int) = List(
x.toByte, x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x)
) ::: (