We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 68e90d4 + 1face3f commit 761f2a2Copy full SHA for 761f2a2
library/src/scala/Product0.scala
library/src/scala/Tuple.scala
@@ -248,9 +248,16 @@ object Tuple {
248
/** A tuple of 0 elements */
249
type EmptyTuple = EmptyTuple.type
250
251
-/** A tuple of 0 elements; the canonical representation of a [[scala.Product0]]. */
252
-object EmptyTuple extends Tuple with Product0 {
+/** A tuple of 0 elements. */
+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
259
def canEqual(that: Any): Boolean = this == that
260
261
override def toString(): String = "()"
262
}
263
0 commit comments