summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-07-11 15:17:36 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-07-11 15:17:36 +0000
commit4b616e2ff3b7484d5d59244463ec1e3844db0c11 (patch)
treea9cbdcd000dafc8ab4f6b3dd26d045b980b91dc3
parent8110e02ec28c2a5e79a6740869700e7f059f41fa (diff)
downloadscala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.tar.gz
scala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.tar.bz2
scala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.zip
Fixes #4723.
Review by extempore.
-rw-r--r--src/library/scala/collection/immutable/List.scala2
-rw-r--r--test/files/run/t4723.scala9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index 1781e7ba36..7d962d2908 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -374,7 +374,7 @@ case object Nil extends List[Nothing] {
throw new UnsupportedOperationException("tail of empty list")
// Removal of equals method here might lead to an infinite recursion similar to IntMap.equals.
override def equals(that: Any) = that match {
- case that1: collection.Seq[_] => that1.isEmpty
+ case that1: collection.GenSeq[_] => that1.isEmpty
case _ => false
}
}
diff --git a/test/files/run/t4723.scala b/test/files/run/t4723.scala
new file mode 100644
index 0000000000..4278ff9aaf
--- /dev/null
+++ b/test/files/run/t4723.scala
@@ -0,0 +1,9 @@
+
+
+
+object Test {
+ def main(args: Array[String]) {
+ assert(Nil == collection.parallel.ParSeq())
+ assert(collection.parallel.ParSeq() == Nil)
+ }
+}