summaryrefslogtreecommitdiff
path: root/src/library/scala/Product2.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2006-11-28 13:05:04 +0000
committerBurak Emir <emir@epfl.ch>2006-11-28 13:05:04 +0000
commit61ef5c893f9f4cab1e9250d91f5d4210594366c2 (patch)
treef24da8c0a8f095ffb83d4c54d4039f488d9daade /src/library/scala/Product2.scala
parent686571753a22bfac40e9897b80d334b38daefc91 (diff)
downloadscala-61ef5c893f9f4cab1e9250d91f5d4210594366c2.tar.gz
scala-61ef5c893f9f4cab1e9250d91f5d4210594366c2.tar.bz2
scala-61ef5c893f9f4cab1e9250d91f5d4210594366c2.zip
product.element index starts with 0
Diffstat (limited to 'src/library/scala/Product2.scala')
-rw-r--r--src/library/scala/Product2.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/library/scala/Product2.scala b/src/library/scala/Product2.scala
index f786593546..208c98d836 100644
--- a/src/library/scala/Product2.scala
+++ b/src/library/scala/Product2.scala
@@ -7,7 +7,7 @@
** |/ **
\* */
-// generated on Mon Nov 27 15:01:28 CET 2006
+// generated on Tue Nov 28 14:03:53 CET 2006
package scala
import Predef._
@@ -23,13 +23,14 @@ trait Product2 [+T1, +T2] extends Product {
override def arity = 2
/**
- * Returns the n-th projection of this product if 0<n<=arity, otherwise null
+ * Returns the n-th projection of this product if 0<=n<arity, otherwise null
* @param n number of the projection to be returned
+ * @return same as _(n+1)
* @throws IndexOutOfBoundsException
*/
override def element(n: Int) = n match {
- case 1 => _1
- case 2 => _2
+ case 0 => _1
+ case 1 => _2
case _ => throw new IndexOutOfBoundsException(n.toString())
}