aboutsummaryrefslogtreecommitdiff
path: root/library/src/scala/Product0.scala
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/scala/Product0.scala')
-rw-r--r--library/src/scala/Product0.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/src/scala/Product0.scala b/library/src/scala/Product0.scala
new file mode 100644
index 000000000..d50721d02
--- /dev/null
+++ b/library/src/scala/Product0.scala
@@ -0,0 +1,23 @@
+/* __ *\
+** ________ ___ / / ___ 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())
+}