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

Explicitly annotate return type of defaultExecutionContext #21

Merged
merged 4 commits into from
Oct 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ val pluginJar = packageTask in (plugin, Compile)
// TODO: the library project's test are really plugin tests, but we first need that jar
lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (MimaPlugin.mimaDefaultSettings: _*) settings (
name := "scala-continuations-library",
MimaKeys.mimaPreviousArtifacts := Set(organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0"),
MimaKeys.mimaPreviousArtifacts := Set(
organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0",
organization.value % s"${name.value}_2.11" % "1.0.2"
),
scalacOptions ++= Seq(
// add the plugin to the compiler
s"-Xplugin:${pluginJar.value.getAbsolutePath}",
Expand Down
10 changes: 3 additions & 7 deletions library/src/test/scala/scala/tools/selectivecps/TestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,8 @@ class HigherOrder {
@Test def t5472 = {
val map = Map("foo" -> 1, "bar" -> 2)
reset {
val mapped =
for {
(location, accessors) <- new ContinuationizedParallelIterable(map)
} yield {
shiftUnit0[Int, Unit](23)
}
val mapped = new ContinuationizedParallelIterable(map)
.map(strIntTpl => shiftUnit0[Int, Unit](23))
assertEquals(List(23, 23), mapped.toList)
}
}
Expand Down Expand Up @@ -792,7 +788,7 @@ class HigherOrder {
}
class ExecutionContext

implicit def defaultExecutionContext = new ExecutionContext
implicit def defaultExecutionContext: ExecutionContext = new ExecutionContext

case class Future[+T](x: T) {
final def map[A](f: T => A): Future[A] = new Future[A](f(x))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package scala.tools.selectivecps

import scala.tools.nsc.transform._
import scala.tools.nsc.symtab._
import scala.tools.nsc.plugins._
import scala.tools.nsc.symtab._
import scala.tools.nsc.transform._

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

import global._ // the global environment
import definitions._ // standard classes and methods
import typer.atOwner // methods to type trees
import global._
import definitions._ // methods to type trees

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

Expand Down
Loading