summaryrefslogtreecommitdiff
path: root/test/files/continuations-run
diff options
context:
space:
mode:
authorphaller <philipp.haller@typesafe.com>2012-06-26 17:09:21 +0200
committerphaller <philipp.haller@typesafe.com>2012-06-27 14:37:20 +0200
commit1a3976fc8276e6e3d7eeda12f645782ca93ea24b (patch)
treeac9eab394af6186acbac7efbcf0f3b8d57c577dd /test/files/continuations-run
parent161b58358ea8685aea26cdfd2fc2d689ce7414e7 (diff)
downloadscala-1a3976fc8276e6e3d7eeda12f645782ca93ea24b.tar.gz
scala-1a3976fc8276e6e3d7eeda12f645782ca93ea24b.tar.bz2
scala-1a3976fc8276e6e3d7eeda12f645782ca93ea24b.zip
Revert pull request #720 (CPS: enable return expressions in CPS code if they are in tail position)
Reverts commit 0ada0706746c9c603bf5bc8a0e6780e5783297cf. Reverts commit 51c92f02229098d0b402a65a72267f7a17984022. Reverts commit cdfbe8e39fbbec00c969cd74f117ae410b98b40b. Reverts commit 796024c7429a03e974a7d8e1dc5c80b84f82467d.
Diffstat (limited to 'test/files/continuations-run')
-rw-r--r--test/files/continuations-run/ts-1681-2.check5
-rw-r--r--test/files/continuations-run/ts-1681-2.scala44
-rw-r--r--test/files/continuations-run/ts-1681-3.check4
-rw-r--r--test/files/continuations-run/ts-1681-3.scala27
-rw-r--r--test/files/continuations-run/ts-1681.check3
-rw-r--r--test/files/continuations-run/ts-1681.scala29
6 files changed, 0 insertions, 112 deletions
diff --git a/test/files/continuations-run/ts-1681-2.check b/test/files/continuations-run/ts-1681-2.check
deleted file mode 100644
index 35b3c93780..0000000000
--- a/test/files/continuations-run/ts-1681-2.check
+++ /dev/null
@@ -1,5 +0,0 @@
-8
-hi
-8
-from try
-8
diff --git a/test/files/continuations-run/ts-1681-2.scala b/test/files/continuations-run/ts-1681-2.scala
deleted file mode 100644
index 8a896dec2c..0000000000
--- a/test/files/continuations-run/ts-1681-2.scala
+++ /dev/null
@@ -1,44 +0,0 @@
-import scala.util.continuations._
-
-class ReturnRepro {
- def s1: Int @cps[Any] = shift { k => k(5) }
- def caller = reset { println(p(3)) }
- def caller2 = reset { println(p2(3)) }
- def caller3 = reset { println(p3(3)) }
-
- def p(i: Int): Int @cps[Any] = {
- val v= s1 + 3
- return v
- }
-
- def p2(i: Int): Int @cps[Any] = {
- val v = s1 + 3
- if (v > 0) {
- println("hi")
- return v
- } else {
- println("hi")
- return 8
- }
- }
-
- def p3(i: Int): Int @cps[Any] = {
- val v = s1 + 3
- try {
- println("from try")
- return v
- } catch {
- case e: Exception =>
- println("from catch")
- return 7
- }
- }
-
-}
-
-object Test extends App {
- val repro = new ReturnRepro
- repro.caller
- repro.caller2
- repro.caller3
-}
diff --git a/test/files/continuations-run/ts-1681-3.check b/test/files/continuations-run/ts-1681-3.check
deleted file mode 100644
index 71489f097c..0000000000
--- a/test/files/continuations-run/ts-1681-3.check
+++ /dev/null
@@ -1,4 +0,0 @@
-enter return expr
-8
-hi
-8
diff --git a/test/files/continuations-run/ts-1681-3.scala b/test/files/continuations-run/ts-1681-3.scala
deleted file mode 100644
index 62c547f5a2..0000000000
--- a/test/files/continuations-run/ts-1681-3.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-import scala.util.continuations._
-
-class ReturnRepro {
- def s1: Int @cpsParam[Any, Unit] = shift { k => k(5) }
- def caller = reset { println(p(3)) }
- def caller2 = reset { println(p2(3)) }
-
- def p(i: Int): Int @cpsParam[Unit, Any] = {
- val v= s1 + 3
- return { println("enter return expr"); v }
- }
-
- def p2(i: Int): Int @cpsParam[Unit, Any] = {
- val v = s1 + 3
- if (v > 0) {
- return { println("hi"); v }
- } else {
- return { println("hi"); 8 }
- }
- }
-}
-
-object Test extends App {
- val repro = new ReturnRepro
- repro.caller
- repro.caller2
-}
diff --git a/test/files/continuations-run/ts-1681.check b/test/files/continuations-run/ts-1681.check
deleted file mode 100644
index 85176d8e66..0000000000
--- a/test/files/continuations-run/ts-1681.check
+++ /dev/null
@@ -1,3 +0,0 @@
-8
-hi
-8
diff --git a/test/files/continuations-run/ts-1681.scala b/test/files/continuations-run/ts-1681.scala
deleted file mode 100644
index efb1abae15..0000000000
--- a/test/files/continuations-run/ts-1681.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-import scala.util.continuations._
-
-class ReturnRepro {
- def s1: Int @cpsParam[Any, Unit] = shift { k => k(5) }
- def caller = reset { println(p(3)) }
- def caller2 = reset { println(p2(3)) }
-
- def p(i: Int): Int @cpsParam[Unit, Any] = {
- val v= s1 + 3
- return v
- }
-
- def p2(i: Int): Int @cpsParam[Unit, Any] = {
- val v = s1 + 3
- if (v > 0) {
- println("hi")
- return v
- } else {
- println("hi")
- return 8
- }
- }
-}
-
-object Test extends App {
- val repro = new ReturnRepro
- repro.caller
- repro.caller2
-}