blob: c43b3322bef8d7463e83e10a5d36b67276d48e2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import scala.util.continuations._
object Test {
def capture(): Int @suspendable = 42
def main(args: Array[String]): Unit = reset {
var i = 0
while (i < 5) {
i += 1
val y = capture()
val s = y
println(s)
}
}
}
|