From f584d243487dcd1214291167707e2f53fef5ab5e Mon Sep 17 00:00:00 2001 From: Tiark Rompf Date: Thu, 11 Mar 2010 16:55:38 +0000 Subject: moved the continuations plugin into trunk. --- test/files/continuations-run/match2.scala | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/files/continuations-run/match2.scala (limited to 'test/files/continuations-run/match2.scala') diff --git a/test/files/continuations-run/match2.scala b/test/files/continuations-run/match2.scala new file mode 100644 index 0000000000..8d4f04870f --- /dev/null +++ b/test/files/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 -- cgit v1.2.3