diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-05 19:19:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-05 19:19:17 +0000 |
commit | 0433d8843272b174d0ce0b7eb3c0ed806bc2705a (patch) | |
tree | 043843abf0623505472fb7898fb3ce769d77a572 /src/library | |
parent | 603f715f52462de73481fd79e12c0deec68d269e (diff) | |
download | scala-0433d8843272b174d0ce0b7eb3c0ed806bc2705a.tar.gz scala-0433d8843272b174d0ce0b7eb3c0ed806bc2705a.tar.bz2 scala-0433d8843272b174d0ce0b7eb3c0ed806bc2705a.zip |
ScalaRunTime method to perform sameElements as ...
ScalaRunTime method to perform sameElements as fix for #2867. Review by
odersky.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 82573bf4b1..d04824bae1 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -179,6 +179,13 @@ object ScalaRunTime { */ @inline def hash(x: Any): Int = Predef.hash(x) + /** A helper method for constructing case class equality methods, + * because existential types get in the way of a clean outcome and + * it's performing a series of Any/Any equals comparisons anyway. + * See ticket #2867 for specifics. + */ + def sameElements(xs1: Seq[Any], xs2: Seq[Any]) = xs1 sameElements xs2 + /** Given any Scala value, convert it to a String. * * The primary motivation for this method is to provide a means for |