diff options
Diffstat (limited to 'test/continuations/run/match2.scala')
-rw-r--r-- | test/continuations/run/match2.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/continuations/run/match2.scala b/test/continuations/run/match2.scala new file mode 100644 index 0000000000..8d4f04870f --- /dev/null +++ b/test/continuations/run/match2.scala @@ -0,0 +1,26 @@ +// $Id$ + +import scala.util.continuations._ + + +object Test { + + def test1() = { + val (a, b) = shift { k: (((String,String)) => String) => k("A","B") } + b + } + + case class Elem[T,U](a: T, b: U) + + def test2() = { + val Elem(a,b) = shift { k: (Elem[String,String] => String) => k(Elem("A","B")) } + b + } + + + def main(args: Array[String]): Any = { + println(reset(test1())) + println(reset(test2())) + } + +}
\ No newline at end of file |