Skip to content

Commit cde8fb2

Browse files
committed
Merge pull request scala#42 from retronym/topic/drop210
Drop Scala 2.10 support
2 parents c522609 + b2178bb commit cde8fb2

File tree

3 files changed

+4
-36
lines changed

3 files changed

+4
-36
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ env:
1212
script:
1313
- admin/build.sh
1414
scala:
15-
- 2.10.4
16-
- 2.11.5
15+
- 2.11.6
1716
jdk:
1817
- oraclejdk8
1918
notifications:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## scala-java8-compat [<img src="https://api.travis-ci.org/scala/scala-java8-compat.png"/>](https://travis-ci.org/scala/scala-java8-compat) [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.10.svg?label=latest%20release%20for%202.10"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.10) [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.11*.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.11*)
1+
## scala-java8-compat [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.11*.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.11*)
22

33
A Java 8 compatibility kit for Scala.
44

project/CodeGen.scala

+2-33
Original file line numberDiff line numberDiff line change
@@ -331,26 +331,9 @@ object CodeGen {
331331
|}
332332
|""".stripMargin.trim
333333
}
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"))
351335
}
352336

353-
// No longer needed under 2.11 (@unspecialized has been fixed), but harmless to keep around to avoid cross-publishing this artifact.
354337
private def function2SpecMethods = {
355338
val apply = specialized("apply", function2Spec) {
356339
case (name, List(t1, t2, r)) =>
@@ -363,21 +346,7 @@ object CodeGen {
363346
|}
364347
|""".stripMargin.trim
365348
}
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"))
381350
}
382351

383352
def specializedSuffix(tparamNames: List[String], tps: List[Type]): String = {

0 commit comments

Comments
 (0)