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

Avoid deprecation/feature warnings #9

Merged
merged 5 commits into from
Sep 16, 2014
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ script:
- sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)' clean update compile test
# TODO: -Dbuild.publish.user=${SONATYPE_USER} -Dbuild.publish.password=${SONATYPE_PASS} $(bash project/release_on_tag.sh)
scala:
- 2.11.0-SNAPSHOT
- 2.11.0
jdk:
- openjdk6
# - openjdk7
Expand Down
7 changes: 5 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
repoName := "scala-continuations",
organization := "org.scala-lang.plugins",
version := "1.0.1-SNAPSHOT",
scalaVersion := "2.11.1",
snapshotScalaBinaryVersion := "2.11.1"
scalaVersion := "2.11.2",
snapshotScalaBinaryVersion := "2.11.2",
scalacOptions ++= Seq(
"-deprecation",
"-feature")
)

lazy val root = project.in( file(".") ).settings( publishArtifact := false ).aggregate(plugin, library).settings(commonSettings : _*)
Expand Down
10 changes: 5 additions & 5 deletions library/src/test/scala/scala/tools/selectivecps/TestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.Assert.assertEquals
import scala.annotation._
import scala.collection.Seq
import scala.collection.generic.CanBuildFrom
import scala.language.{ implicitConversions }
import scala.language.{ implicitConversions, higherKinds }
import scala.util.continuations._
import scala.util.control.Exception

Expand Down Expand Up @@ -403,9 +403,9 @@ class Suspendable {
def test4[A](x: List[A]): A @suspendable = x match { case List(x) => x }

@Test def t1821 {
assertEquals((), reset(test1()))
assertEquals((), reset(test1(())))
assertEquals((), reset(test2(List(()))))
assertEquals((), reset(test3()))
assertEquals((), reset(test3(())))
assertEquals((), reset(test4(List(()))))
}
}
Expand Down Expand Up @@ -716,12 +716,12 @@ class HigherOrder {
reset {
f(element)
if (super.decrementAndGet() == 0) {
continue()
continue(())
}
}
}
if (super.decrementAndGet() == 0) {
continue()
continue(())
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ trait CPSUtils {
lazy val MarkerCPSAdaptMinus = rootMirror.getRequiredClass("scala.util.continuations.cpsMinus")

lazy val Context = rootMirror.getRequiredClass("scala.util.continuations.ControlContext")
lazy val ModCPS = rootMirror.getPackage("scala.util.continuations")
lazy val ModCPS = rootMirror.getPackage(TermName("scala.util.continuations"))

lazy val MethShiftUnit = definitions.getMember(ModCPS, cpsNames.shiftUnit)
lazy val MethShiftUnit0 = definitions.getMember(ModCPS, cpsNames.shiftUnit0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ abstract class SelectiveANFTransform extends PluginComponent with Transform with
debuglog("cps type conversion (expected: " + cpsR.get + "): " + expr)

if (!hasPlusMarker(expr.tpe))
unit.warning(tree.pos, "expression " + tree + " is cps-transformed unexpectedly")
reporter.warning(tree.pos, "expression " + tree + " is cps-transformed unexpectedly")

try {
val Some((a, b)) = cpsR
Expand Down Expand Up @@ -446,7 +446,7 @@ abstract class SelectiveANFTransform extends PluginComponent with Transform with
// all is well

if (hasPlusMarker(expr.tpe)) {
unit.warning(tree.pos, "expression " + expr + " of type " + expr.tpe + " is not expected to have a cps type")
reporter.warning(tree.pos, "expression " + expr + " of type " + expr.tpe + " is not expected to have a cps type")
expr modifyType removeAllCPSAnnotations
}

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.5
sbt.version=0.13.6