Skip to content

Commit

Permalink
Merge pull request #10398 from dotty-staging/remove-product0
Browse files Browse the repository at this point in the history
Remove scala.Product0.
  • Loading branch information
bishabosha authored Nov 20, 2020
2 parents 68e90d4 + 1face3f commit 761f2a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
23 changes: 0 additions & 23 deletions library/src/scala/Product0.scala

This file was deleted.

11 changes: 9 additions & 2 deletions library/src/scala/Tuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,16 @@ object Tuple {
/** A tuple of 0 elements */
type EmptyTuple = EmptyTuple.type

/** A tuple of 0 elements; the canonical representation of a [[scala.Product0]]. */
object EmptyTuple extends Tuple with Product0 {
/** A tuple of 0 elements. */
object EmptyTuple extends Tuple {
override def productArity: Int = 0

@throws(classOf[IndexOutOfBoundsException])
override def productElement(n: Int): Any =
throw new IndexOutOfBoundsException(n.toString())

def canEqual(that: Any): Boolean = this == that

override def toString(): String = "()"
}

Expand Down

0 comments on commit 761f2a2

Please sign in to comment.