diff --git a/library/src/scala/Product0.scala b/library/src/scala/Product0.scala deleted file mode 100644 index d50721d02da7..000000000000 --- a/library/src/scala/Product0.scala +++ /dev/null @@ -1,23 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ -package scala - -/** A class for Product0 which was missing from the scala distribution. */ -object Product0 { - def unapply(x: Product0): Option[Product0] = - Some(x) -} - -trait Product0 extends Any with Product { - - override def productArity = 0 - - @throws(classOf[IndexOutOfBoundsException]) - override def productElement(n: Int) = - throw new IndexOutOfBoundsException(n.toString()) -} diff --git a/library/src/scala/Tuple.scala b/library/src/scala/Tuple.scala index a17e73c509be..851facda3533 100644 --- a/library/src/scala/Tuple.scala +++ b/library/src/scala/Tuple.scala @@ -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 = "()" }