diff options
Diffstat (limited to 'src/build')
-rw-r--r-- | src/build/genprod.scala | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/build/genprod.scala b/src/build/genprod.scala index 5ea86232db..229ef1ae7a 100644 --- a/src/build/genprod.scala +++ b/src/build/genprod.scala @@ -129,7 +129,7 @@ object FunctionFile { ** |/ ** \* */ -// $Id$ +// {"$Id$"} // generated by genprod on {new java.util.Date().toString()} {if(descriptiveComment(i).length > 0) "(with fancy comment)" else ""} {if(moreMethods(i).length > 0) "(with extra methods)" else ""} @@ -224,7 +224,8 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz */ object TupleFile { import genprod._ def make(i: Int) = { - val __typeArgs__ = covariantArgs(i).mkString("[",", ","]") + val __typeArgs__ = covariantArgs(i).mkString("[",", ","]") + val __typeArgRefs__ = targs(i).mkString("[",", ","]") val __fields__ = fields(i) <file name={tupleFilename(i)}> /* __ *\ @@ -235,14 +236,15 @@ object TupleFile { ** |/ ** \* */ -// $Id$ +// {"$Id$"} // generated by genprod on {new java.util.Date().toString()} package scala /** {tupleClassname(i)} is the canonical representation of a @see {productClassname(i)} */ -case class {tupleClassname(i)}{__typeArgs__}({ __fields__ }) {{ +case class {tupleClassname(i)}{__typeArgs__}({ __fields__ }) + extends {productClassname(i)}{__typeArgRefs__} {{ override def toString() = {{ val sb = new compat.StringBuilder @@ -280,7 +282,7 @@ object ProductFile { ** |/ ** \* */ -// $Id$ +// {"$Id$"} // generated by genprod on {new java.util.Date().toString()} @@ -289,11 +291,8 @@ package scala import Predef._ object {productClassname(i)} {{ - def unapply{__refArgs__}(x: Any): Option[{productClassname(i)}{__refArgs__}] = - if (x.isInstanceOf[{productClassname(i)}{__refArgs__}]) - Some(x.asInstanceOf[{productClassname(i)}{__refArgs__}]) - else - None + def unapply{__refArgs__}(x: {productClassname(i)}{__refArgs__}): Some[{productClassname(i)}{__refArgs__}] = + Some(x) }} /** {productClassname(i)} is a cartesian product of {i} components |