From 6613b1cdae66ae23edfd0e20eb5d4d066018681d Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 19 Mar 2010 21:48:42 +0000 Subject: 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. --- test/files/run/equality.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/files/run/equality.scala') 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) ) ::: ( -- cgit v1.2.3