Thanks, looks like I was missing
... with AutoCompilerPlugins
and
val cont = compilerPlugin("org.scala-lang.plugins" %
"continuations" % "2.8.0.RC1")
Continuations run through the compiler fine now. However, they're
still unavailable in the
console. The following works fine in "scala -P:continuations:enable"
import scala.util.continuations._
reset { val i = shift { body: (Int => Unit) => body(5);
println("done") }; println(i) }
but fails in the SBT console, resulting in a
java.lang.NoSuchMethodError: scala.util.continuations.package
$.shift(Lscala/Function1;)Ljava/lang/Object;
at $anonfun$1.apply$mcV$sp(<console>:14)
at $anonfun$1.apply(<console>:14)
at $anonfun$1.apply(<console>:14)
I'd really love to have continuations available in the SBT console
(not only for testing code). Does anyone
know a way to do it?