summaryrefslogtreecommitdiff
path: root/test/files/continuations-run/ifelse2.scala
blob: 536e35019075a66877b6f2e1be691e98f436f0e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// $Id$

import scala.util.continuations._


object Test {

  def test(x:Int) = if (x <= 7)
    shift { k: (Unit=>Unit) => println("abort") }

  def main(args: Array[String]): Any = {
    println(reset{ test(7); println("alive") })
    println(reset{ test(8); println("alive") })
  }

}