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/ifelse0.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/files/continuations-run/ifelse0.scala (limited to 'test/files/continuations-run/ifelse0.scala') diff --git a/test/files/continuations-run/ifelse0.scala b/test/files/continuations-run/ifelse0.scala new file mode 100644 index 0000000000..e34b86ee84 --- /dev/null +++ b/test/files/continuations-run/ifelse0.scala @@ -0,0 +1,18 @@ +// $Id$ + +import scala.util.continuations._ + + +object Test { + + def test(x:Int) = if (x <= 7) + shift { k: (Int=>Int) => k(k(k(x))) } + else + shift { k: (Int=>Int) => k(x) } + + def main(args: Array[String]): Any = { + println(reset(1 + test(7))) + println(reset(1 + test(8))) + } + +} \ No newline at end of file -- cgit v1.2.3