@@ -331,26 +331,9 @@ object CodeGen {
331
331
|}
332
332
| """ .stripMargin.trim
333
333
}
334
- // andThen / compose variants are no longer needed under 2.11 (@unspecialized has been fixed),
335
- // but harmless. With them, we can use the same artifact for 2.10 and 2.11
336
- val compose = specialized(" compose" , function1Spec) {
337
- case (name, List (t1, r1)) =>
338
- s """
339
- |default scala.Function1 $name(scala.Function1 g) {
340
- | return compose(g);
341
- |} """ .stripMargin.trim
342
- }
343
- val andThen = specialized(" andThen" , function1Spec) {
344
- case (name, List (t1, r1)) =>
345
- s """
346
- |default scala.Function1 $name(scala.Function1 g) {
347
- | return andThen(g);
348
- |} """ .stripMargin.trim
349
- }
350
- indent(List (apply, compose, andThen).mkString(" \n\n " ))
334
+ indent(List (apply).mkString(" \n\n " ))
351
335
}
352
336
353
- // No longer needed under 2.11 (@unspecialized has been fixed), but harmless to keep around to avoid cross-publishing this artifact.
354
337
private def function2SpecMethods = {
355
338
val apply = specialized(" apply" , function2Spec) {
356
339
case (name, List (t1, t2, r)) =>
@@ -363,21 +346,7 @@ object CodeGen {
363
346
|}
364
347
| """ .stripMargin.trim
365
348
}
366
- val curried = specialized(" curried" , function2Spec) {
367
- case (name, List (t1, t2, r)) =>
368
- s """
369
- |default scala.Function1 $name() {
370
- | return curried();
371
- |} """ .stripMargin.trim
372
- }
373
- val tupled = specialized(" tupled" , function2Spec) {
374
- case (name, List (t1, t2, r)) =>
375
- s """
376
- |default scala.Function1 $name() {
377
- | return tupled();
378
- |} """ .stripMargin.trim
379
- }
380
- indent(List (apply, curried, tupled).mkString(" \n\n " ))
349
+ indent(List (apply).mkString(" \n\n " ))
381
350
}
382
351
383
352
def specializedSuffix (tparamNames : List [String ], tps : List [Type ]): String = {
0 commit comments