Skip to content

Commit 761f2a2

Browse files
authored
Merge pull request #10398 from dotty-staging/remove-product0
Remove scala.Product0.
2 parents 68e90d4 + 1face3f commit 761f2a2

File tree

2 files changed

+9
-25
lines changed

2 files changed

+9
-25
lines changed

library/src/scala/Product0.scala

Lines changed: 0 additions & 23 deletions
This file was deleted.

library/src/scala/Tuple.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,16 @@ object Tuple {
248248
/** A tuple of 0 elements */
249249
type EmptyTuple = EmptyTuple.type
250250

251-
/** A tuple of 0 elements; the canonical representation of a [[scala.Product0]]. */
252-
object EmptyTuple extends Tuple with Product0 {
251+
/** A tuple of 0 elements. */
252+
object EmptyTuple extends Tuple {
253+
override def productArity: Int = 0
254+
255+
@throws(classOf[IndexOutOfBoundsException])
256+
override def productElement(n: Int): Any =
257+
throw new IndexOutOfBoundsException(n.toString())
258+
253259
def canEqual(that: Any): Boolean = this == that
260+
254261
override def toString(): String = "()"
255262
}
256263

0 commit comments

Comments
 (0)