66** |/ **
77\* */
88
9+ import language .postfixOps
10+
911/** This program generates the ProductN, TupleN, FunctionN,
1012 * and AbstractFunctionN, where 0 <= N <= MAX_ARITY.
1113 *
@@ -75,7 +77,7 @@ package %s
7577
7678 if (args.length != 1 ) {
7779 println(" please give path of output directory" )
78- exit(- 1 )
80+ sys. exit(- 1 )
7981 }
8082 val out = args(0 )
8183 def writeFile (node : scala.xml.Node ) {
@@ -96,7 +98,7 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz */
9698
9799object FunctionZero extends Function (0 ) {
98100 override def genprodString = " \n // genprod generated these sources at: " + new java.util.Date ()
99- override def covariantSpecs = " @specialized "
101+ override def covariantSpecs = " @specialized(Specializable.Primitives) "
100102 override def descriptiveComment = " " + functionNTemplate.format(" javaVersion" , " anonfun0" ,
101103"""
102104 * val javaVersion = () => sys.props("java.version")
@@ -111,8 +113,8 @@ object FunctionZero extends Function(0) {
111113
112114object FunctionOne extends Function (1 ) {
113115 override def classAnnotation = " @annotation.implicitNotFound(msg = \" No implicit view available from ${T1} => ${R}.\" )\n "
114- override def contravariantSpecs = " @specialized(scala.Int, scala.Long, scala.Float, scala.Double, scala.AnyRef) "
115- override def covariantSpecs = " @specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double, scala.AnyRef) "
116+ override def contravariantSpecs = " @specialized(scala.Int, scala.Long, scala.Float, scala.Double/* , scala.AnyRef*/ ) "
117+ override def covariantSpecs = " @specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double/* , scala.AnyRef*/ ) "
116118
117119 override def descriptiveComment = " " + functionNTemplate.format(" succ" , " anonfun1" ,
118120"""
@@ -169,7 +171,7 @@ object Function {
169171
170172class Function (val i : Int ) extends Group (" Function" ) with Arity {
171173 def descriptiveComment = " "
172- def functionNTemplate =
174+ def functionNTemplate =
173175"""
174176 * In the following example, the definition of %s is a
175177 * shorthand for the anonymous class definition %s:
@@ -226,7 +228,7 @@ class Function(val i: Int) extends Group("Function") with Arity {
226228 }
227229
228230 def tupleMethod = {
229- def comment =
231+ def comment =
230232""" /** Creates a tupled version of this function: instead of %d arguments,
231233 * it accepts a single [[scala.Tuple%d]] argument.
232234 *
@@ -275,7 +277,7 @@ object TupleOne extends Tuple(1)
275277object TupleTwo extends Tuple (2 )
276278{
277279 override def imports = Tuple .zipImports
278- override def covariantSpecs = " @specialized(Int, Long, Double, Char, Boolean, AnyRef) "
280+ override def covariantSpecs = " @specialized(Int, Long, Double, Char, Boolean/* , AnyRef*/ ) "
279281 override def moreMethods = """
280282 /** Swaps the elements of this `Tuple`.
281283 * @return a new Tuple where the first element is the second element of this Tuple and the
0 commit comments