summaryrefslogtreecommitdiff
path: root/src/library/scala/Product2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/Product2.scala')
-rw-r--r--src/library/scala/Product2.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/Product2.scala b/src/library/scala/Product2.scala
index 8097245926..eb67e5d46e 100644
--- a/src/library/scala/Product2.scala
+++ b/src/library/scala/Product2.scala
@@ -17,13 +17,13 @@ object Product2 {
/** Product2 is a cartesian product of 2 components.
* @since 2.3
*/
-trait Product2[@specialized(Int, Long, Double) +T1, @specialized(Int, Long, Double) +T2] extends Product {
+trait Product2[@specialized(Int, Long, Double) +T1, @specialized(Int, Long, Double) +T2] extends Any with Product {
/** The arity of this product.
* @return 2
*/
override def productArity = 2
-
+
/** Returns the n-th projection of this product if 0 < n <= productArity,
* otherwise throws an `IndexOutOfBoundsException`.
*
@@ -33,7 +33,7 @@ trait Product2[@specialized(Int, Long, Double) +T1, @specialized(Int, Long, Doub
*/
@throws(classOf[IndexOutOfBoundsException])
- override def productElement(n: Int) = n match {
+ override def productElement(n: Int) = n match {
case 0 => _1
case 1 => _2
case _ => throw new IndexOutOfBoundsException(n.toString())