diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-07-11 15:17:36 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-07-11 15:17:36 +0000 |
commit | 4b616e2ff3b7484d5d59244463ec1e3844db0c11 (patch) | |
tree | a9cbdcd000dafc8ab4f6b3dd26d045b980b91dc3 | |
parent | 8110e02ec28c2a5e79a6740869700e7f059f41fa (diff) | |
download | scala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.tar.gz scala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.tar.bz2 scala-4b616e2ff3b7484d5d59244463ec1e3844db0c11.zip |
Fixes #4723.
Review by extempore.
-rw-r--r-- | src/library/scala/collection/immutable/List.scala | 2 | ||||
-rw-r--r-- | test/files/run/t4723.scala | 9 |
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) + } +} |