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




                                 
  


                                
                         





                 
                         

                          
  



                                         
 
// $Id$

import scala.util.continuations._

object Test {
  
  def foo = try {
    shift((k: Int=>Int) => k(7))
  } catch {
    case ex: Throwable =>
      9
  }

  def bar = try {
    7
  } catch {
    case ex: Throwable =>
    shiftUnit0[Int,Int](9)
  }
  
  def main(args: Array[String]): Unit = {
    println(reset { foo + 3 })
    println(reset { bar + 3 })
  }
}