summaryrefslogtreecommitdiff
path: root/test/files/continuations-run/t5314-with-if.scala
blob: 5840199a3cb93875da61ada300ae66c88d0b27b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import scala.util.continuations._

object Test extends App {

  def foo(x:Int): Int @cps[Int] = 7

  def bar(x:Int): Int @cps[Int] = {
    val v = foo(x)
    if (v > 0)
      return v
    else
      return 10
  }

  println(reset { bar(10) })

}