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

import scala.util.continuations._


object Test {
 
  def test(x:Int) = x match {
    case 7 => shift { k: (Int=>Int) => k(k(k(x))) }
    case 8 => shift { k: (Int=>Int) => k(x) }
  }
  
  def main(args: Array[String]): Any = {
    println(reset(1 + test(7)))
    println(reset(1 + test(8)))
  }
  
}