New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using "for ... yield" with continuation #5472

Closed
scabug opened this Issue Feb 15, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

scabug commented Feb 15, 2012

I have a ContinuationizedParallelIterable.scala:

import scala.annotation._
import scala.util.continuations._
import java.util.concurrent.atomic._

object ContinuationizedParallelIterable {
  def main(args: Array[String]) {
    val map = Map("foo" -> 1, "bar" -> 2)
    reset {
      val mapped =
        for {
          (location, accessors) <- new ContinuationizedParallelIterable(map)
        } yield {
          shiftUnit0[Int, Unit](23)
        }
      println(mapped)
    }

  }
}

final class ContinuationizedParallelIterable[+A](
  protected val underline: Iterable[A]) {

  final def filter(p: A => Boolean @suspendable): ContinuationizedParallelIterable[A] @suspendable =
    shift(
      new AtomicInteger(1) with ((ContinuationizedParallelIterable[A] => Unit) => Unit) {
        private val results = new AtomicReference[List[A]](Nil)

        @tailrec
        private def add(element: A) {
          val old = results.get
          if (!results.compareAndSet(old, element :: old)) {
            add(element)
          }
        }

        override final def apply(continue: ContinuationizedParallelIterable[A] => Unit) {
          for (element <- underline) {
            super.incrementAndGet()
            reset {
              val pass = p(element)
              if (pass) {
                add(element)
              }
              if (super.decrementAndGet() == 0) {
                continue(new ContinuationizedParallelIterable(results.get))
              }
            }
          }
          if (super.decrementAndGet() == 0) {
            continue(new ContinuationizedParallelIterable(results.get))
          }
        }
      })

  final def foreach[U](f: A => U @suspendable): Unit @suspendable =
    shift(
      new AtomicInteger(1) with ((Unit => Unit) => Unit) {
        override final def apply(continue: Unit => Unit) {
          for (element <- underline) {
            super.incrementAndGet()
            reset {
              f(element)
              if (super.decrementAndGet() == 0) {
                continue()
              }
            }
          }
          if (super.decrementAndGet() == 0) {
            continue()
          }
        }
      })

  final def map[B: Manifest](f: A => B @suspendable): ContinuationizedParallelIterable[B] @suspendable =
    shift(
      new AtomicInteger(underline.size) with ((ContinuationizedParallelIterable[B] => Unit) => Unit) {
        override final def apply(continue: ContinuationizedParallelIterable[B] => Unit) {
          val results = new Array[B](super.get)
          for ((element, i) <- underline.view zipWithIndex) {
            reset {
              val result = f(element)
              results(i) = result
              if (super.decrementAndGet() == 0) {
                continue(new ContinuationizedParallelIterable(results))
              }
            }
          }
        }
      })
}

Then I compiled it by scalac:

scalac -P:continuations:enable ContinuationizedParallelIterable.scala

I got stderr:

error: scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : (java.lang.String, Int) => scala.util.continuations.ControlContext[Boolean,Unit,Unit]
 required: scala.util.continuations.ControlContext[Boolean,Unit,Unit]
	at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
	at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
	at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
	at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:4428)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1760)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
	at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1278)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3910)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3951)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4331)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPos(Typers.scala:4335)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformFunction(UnCurry.scala:357)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:594)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:845)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:835)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:511)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:510)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:597)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:511)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:510)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:597)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:142)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:126)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
	at scala.tools.nsc.Main$.process(Main.scala:106)
	at scala.tools.nsc.Main$.main(Main.scala:123)
	at scala.tools.nsc.Main.main(Main.scala)

Exception in thread "main" scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : (java.lang.String, Int) => scala.util.continuations.ControlContext[Boolean,Unit,Unit]
 required: scala.util.continuations.ControlContext[Boolean,Unit,Unit]
	at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
	at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
	at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
	at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:4428)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1760)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
	at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1278)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3910)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
	at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3951)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4331)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPos(Typers.scala:4335)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformFunction(UnCurry.scala:357)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:594)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:845)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:835)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:511)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:510)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:597)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:574)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:572)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:528)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:511)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:474)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:510)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:597)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	at scala.collection.immutable.List.loop$1(List.scala:117)
	at scala.collection.immutable.List.mapConserve(List.scala:133)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:51)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:31)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:600)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:148)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:142)
	at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:126)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
	at scala.tools.nsc.Main$.process(Main.scala:106)
	at scala.tools.nsc.Main$.main(Main.scala:123)
	at scala.tools.nsc.Main.main(Main.scala)

And I got stdout:

exception when traversing ((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})
exception when traversing new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
}))
exception when traversing new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap
exception when traversing new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit]
exception when traversing new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
exception when traversing {
  new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
}
exception when traversing final def apply(): scala.util.continuations.ControlContext[Unit,Unit,Unit] = {
  new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
}
exception when traversing scala.runtime.AbstractFunction0[scala.util.continuations.ControlContext[Unit,Unit,Unit]] with Serializable {
  def this(): anonymous class $anonfun = {
    $anonfun.super.this();
    ()
  };
  final def apply(): scala.util.continuations.ControlContext[Unit,Unit,Unit] = {
    new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
  }
}
exception when traversing @SerialVersionUID(0) final <synthetic> class $anonfun extends scala.runtime.AbstractFunction0[scala.util.continuations.ControlContext[Unit,Unit,Unit]] with Serializable {
  def this(): anonymous class $anonfun = {
    $anonfun.super.this();
    ()
  };
  final def apply(): scala.util.continuations.ControlContext[Unit,Unit,Unit] = {
    new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
  }
}
exception when traversing {
  @SerialVersionUID(0) final <synthetic> class $anonfun extends scala.runtime.AbstractFunction0[scala.util.continuations.ControlContext[Unit,Unit,Unit]] with Serializable {
    def this(): anonymous class $anonfun = {
      $anonfun.super.this();
      ()
    };
    final def apply(): scala.util.continuations.ControlContext[Unit,Unit,Unit] = {
      new ContinuationizedParallelIterable[(java.lang.String, Int)](map).filter(((check$ifrefutable$1: (java.lang.String, Int)) => (check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
  case _ => package.this.shiftUnitR[Boolean, Unit]((check$ifrefutable$1: (java.lang.String, Int) @unchecked) match {
    case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => true
    case _ => false
  })
})).flatMap[Unit, Unit, Unit](((tmp1: ContinuationizedParallelIterable[(java.lang.String, Int)]) => tmp1.map[Int](((x$1: (java.lang.String, Int)) => (x$1: (java.lang.String, Int) @unchecked) match {
  case (_1: java.lang.String, _2: Int)(java.lang.String, Int)((location @ _), (accessors @ _)) => scala.util.continuations.`package`.shiftUnit0[Int, Unit](23)
}))(reflect.this.Manifest.Int).map[Unit](((mapped: ContinuationizedParallelIterable[Int]) => scala.this.Predef.println(mapped)))))
    }
  };
  (new anonymous class $anonfun(): () => scala.util.continuations.ControlContext[Unit,Unit,Unit])
}
@scabug

This comment has been minimized.

Copy link
Author

scabug commented Feb 15, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5472?orig=1
Reporter: @Atry
Affected Versions: 2.9.1
Other Milestones: 2.10.0

@scabug

This comment has been minimized.

Copy link
Author

scabug commented May 3, 2012

@paulp said:
This was fixed in either 37eabf615a or 62acd24905 about a month ago. A different issue has come out involving virtpatmat; I'm closing this because I don't know if the message issued is meaningful (it still compiles.) It compiles without that warning if -Xoldpatmat is given.

scalac -P:continuations:enable test/files/pos/t5472.scala
test/files/pos/t5472.scala:11: warning: expression matchEnd2(x: Int){
  x
} is cps-transformed unexpectedly
          (location, accessors) <- new ContinuationizedParallelIterable(map)
                                ^
warning: there were 1 deprecation warnings; re-run with -deprecation for details
warning: there were 1 feature warnings; re-run with -feature for details
three warnings found

@scabug scabug closed this May 3, 2012

@scabug scabug added this to the 2.10.0-M3 milestone Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment