diff options
-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) + } +} |