Skip to content

Commit

Permalink
Add intended but missing Serializable in View
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Jun 18, 2018
1 parent 2cd51ee commit 8911b4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/library/scala/collection/View.scala
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ object View extends IterableFactory[View] {

/** A view that partitions an underlying collection into two views */
@SerialVersionUID(3L)
class Partition[A](val underlying: SomeIterableOps[A], val p: A => Boolean) {
class Partition[A](val underlying: SomeIterableOps[A], val p: A => Boolean) extends Serializable {

/** The view consisting of all elements of the underlying collection
* that satisfy `p`.
Expand Down Expand Up @@ -288,13 +288,13 @@ object View extends IterableFactory[View] {
}

@SerialVersionUID(3L)
class Unzip[A, A1, A2](underlying: SomeIterableOps[A])(implicit asPair: A => (A1, A2)) {
class Unzip[A, A1, A2](underlying: SomeIterableOps[A])(implicit asPair: A => (A1, A2)) extends Serializable {
val first: View[A1] = new View.Map[A, A1](underlying, asPair(_)._1)
val second: View[A2] = new View.Map[A, A2](underlying, asPair(_)._2)
}

@SerialVersionUID(3L)
class Unzip3[A, A1, A2, A3](underlying: SomeIterableOps[A])(implicit asTriple: A => (A1, A2, A3)) {
class Unzip3[A, A1, A2, A3](underlying: SomeIterableOps[A])(implicit asTriple: A => (A1, A2, A3)) extends Serializable {
val first: View[A1] = new View.Map[A, A1](underlying, asTriple(_)._1)
val second: View[A2] = new View.Map[A, A2](underlying, asTriple(_)._2)
val third: View[A3] = new View.Map[A, A3](underlying, asTriple(_)._3)
Expand Down

0 comments on commit 8911b4b

Please sign in to comment.