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-neg/t2949.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/continuations-neg/t2949.scala (limited to 'test/files/continuations-neg/t2949.scala') diff --git a/test/files/continuations-neg/t2949.scala b/test/files/continuations-neg/t2949.scala new file mode 100644 index 0000000000..ce27c7c0e8 --- /dev/null +++ b/test/files/continuations-neg/t2949.scala @@ -0,0 +1,15 @@ +// $Id$ + +import scala.util.continuations._ + +object Test { + + def reflect[A,B](xs : List[A]) = shift{ xs.flatMap[B, List[B]] } + def reify[A, B](x : A @cpsParam[List[A], B]) = reset{ List(x) } + + def main(args: Array[String]): Unit = println(reify { + val x = reflect[Int, Int](List(1,2,3)) + val y = reflect[Int, Int](List(2,4,8)) + x * y + }) +} -- cgit v1.2.3