Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit 53ce604

Browse files
authored
Merge pull request #21 from danslapman/master
Fix 2.12.0-RC1 compatibility
2 parents c91524a + 41716d7 commit 53ce604

File tree

4 files changed

+555
-13
lines changed

4 files changed

+555
-13
lines changed

build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ val pluginJar = packageTask in (plugin, Compile)
3030
// TODO: the library project's test are really plugin tests, but we first need that jar
3131
lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (MimaPlugin.mimaDefaultSettings: _*) settings (
3232
name := "scala-continuations-library",
33-
MimaKeys.mimaPreviousArtifacts := Set(organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0"),
33+
MimaKeys.mimaPreviousArtifacts := Set(
34+
organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0",
35+
organization.value % s"${name.value}_2.11" % "1.0.2"
36+
),
3437
scalacOptions ++= Seq(
3538
// add the plugin to the compiler
3639
s"-Xplugin:${pluginJar.value.getAbsolutePath}",

library/src/test/scala/scala/tools/selectivecps/TestSuite.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,8 @@ class HigherOrder {
661661
@Test def t5472 = {
662662
val map = Map("foo" -> 1, "bar" -> 2)
663663
reset {
664-
val mapped =
665-
for {
666-
(location, accessors) <- new ContinuationizedParallelIterable(map)
667-
} yield {
668-
shiftUnit0[Int, Unit](23)
669-
}
664+
val mapped = new ContinuationizedParallelIterable(map)
665+
.map(strIntTpl => shiftUnit0[Int, Unit](23))
670666
assertEquals(List(23, 23), mapped.toList)
671667
}
672668
}
@@ -792,7 +788,7 @@ class HigherOrder {
792788
}
793789
class ExecutionContext
794790

795-
implicit def defaultExecutionContext = new ExecutionContext
791+
implicit def defaultExecutionContext: ExecutionContext = new ExecutionContext
796792

797793
case class Future[+T](x: T) {
798794
final def map[A](f: T => A): Future[A] = new Future[A](f(x))

plugin/src/main/scala/scala/tools/selectivecps/SelectiveANFTransform.scala renamed to plugin/src/main/scala-2.11/scala/tools/selectivecps/SelectiveANFTransform.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
package scala.tools.selectivecps
44

5-
import scala.tools.nsc.transform._
6-
import scala.tools.nsc.symtab._
75
import scala.tools.nsc.plugins._
6+
import scala.tools.nsc.symtab._
7+
import scala.tools.nsc.transform._
88

99
/**
1010
* In methods marked @cps, explicitly name results of calls to other @cps methods
@@ -13,9 +13,8 @@ abstract class SelectiveANFTransform extends PluginComponent with Transform with
1313
TypingTransformers with CPSUtils {
1414
// inherits abstract value `global` and class `Phase` from Transform
1515

16-
import global._ // the global environment
17-
import definitions._ // standard classes and methods
18-
import typer.atOwner // methods to type trees
16+
import global._
17+
import definitions._ // methods to type trees
1918

2019
override def description = "ANF pre-transform for @cps"
2120

0 commit comments

Comments
 (0)