mirror of https://github.com/sbt/sbt.git
Remove all warnings from stdTaskProj
This commit is contained in:
parent
f274aaa811
commit
87dfb2c0f5
|
|
@ -25,7 +25,7 @@ sealed trait Action[T] {
|
|||
* If `inline` is true, `f` will be evaluated on the scheduler thread without the overhead of normal scheduling when possible.
|
||||
* This is intended as an optimization for already evaluated values or very short pure computations.
|
||||
*/
|
||||
final case class Pure[T](f: () => T, inline: Boolean) extends Action[T] {
|
||||
final case class Pure[T](f: () => T, `inline`: Boolean) extends Action[T] {
|
||||
private[sbt] def mapTask(f: Task ~> Task) = this
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ object TaskRunnerCircularTest extends Properties("TaskRunner Circular") {
|
|||
}
|
||||
try { tryRun(top, true, workers); false } catch { case i: Incomplete => cyclic(i) }
|
||||
}
|
||||
|
||||
def cyclic(i: Incomplete) =
|
||||
Incomplete
|
||||
.allExceptions(i)
|
||||
.exists(_.isInstanceOf[Execute[({ type A[_] <: AnyRef })#A]#CyclicException[_]])
|
||||
.exists(_.isInstanceOf[Execute[({ type A[_] <: AnyRef })#A @unchecked]#CyclicException[_]])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ object TaskRunnerForkTest extends Properties("TaskRunner Fork") {
|
|||
true
|
||||
}
|
||||
def runDoubleJoin(a: Int, b: Int, workers: Int): Unit = {
|
||||
def inner(i: Int) = List.range(0, b).map(j => task(j).named(j.toString)).join
|
||||
tryRun(List.range(0, a).map(inner).join, false, workers)
|
||||
def inner = List.range(0, b).map(j => task(j).named(j.toString)).join
|
||||
tryRun(List.range(0, a).map(_ => inner).join, false, workers)
|
||||
}
|
||||
property("fork and reduce") = forAll(TaskListGen, MaxWorkersGen) { (m: List[Int], workers: Int) =>
|
||||
m.nonEmpty ==> {
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ object Test extends std.TaskExtra {
|
|||
val d2 = t3(a, b2, c) mapR f
|
||||
val f2: Values => Task[Any] = {
|
||||
case (Value(aa), Value(bb), Value(cc)) => task(aa + " " + bb + " " + cc)
|
||||
case x => d3
|
||||
case _ => d3
|
||||
}
|
||||
lazy val d = t3(a, b, c) flatMapR f2
|
||||
val f3: Values => Task[Any] = {
|
||||
case (Value(aa), Value(bb), Value(cc)) => task(aa + " " + bb + " " + cc)
|
||||
case x => d2
|
||||
case _ => d2
|
||||
}
|
||||
lazy val d3 = t3(a, b, c) flatMapR f3
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue