summaryrefslogblamecommitdiff
path: root/test/files/continuations-run/match1.scala
blob: b89fb706b01406f3955d5b37eb72dbeb9ee735d0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11





                                 
 



                                                   
 
                                         


                               
 
 
// $Id$

import scala.util.continuations._


object Test {

  def test(x:Int) = x match {
    case 7 => shift { k: (Int=>Int) => k(k(k(x))) }
    case _ => x
  }

  def main(args: Array[String]): Unit = {
    println(reset(1 + test(7)))
    println(reset(1 + test(8)))
  }

}