summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-06-28 03:53:06 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-06-28 03:53:06 -0700
commitdf00b410635cd3164b74ab55d1b44fd772a65653 (patch)
tree9c5fa36022898eace09b431f3b05dfb1cc4545ea /test
parent2261452d18e955e16bbe43e7a21e8d79c44325e8 (diff)
parent1a3976fc8276e6e3d7eeda12f645782ca93ea24b (diff)
downloadscala-df00b410635cd3164b74ab55d1b44fd772a65653.tar.gz
scala-df00b410635cd3164b74ab55d1b44fd772a65653.tar.bz2
scala-df00b410635cd3164b74ab55d1b44fd772a65653.zip
Merge pull request #783 from phaller/topic/cps-return-revert
Revert pull request #720 (CPS: enable return expressions in CPS code if ...
Diffstat (limited to 'test')
-rw-r--r--test/files/continuations-neg/ts-1681-nontail-return.check4
-rw-r--r--test/files/continuations-neg/ts-1681-nontail-return.scala18
-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
8 files changed, 0 insertions, 134 deletions
diff --git a/test/files/continuations-neg/ts-1681-nontail-return.check b/test/files/continuations-neg/ts-1681-nontail-return.check
deleted file mode 100644
index 8fe15f154b..0000000000
--- a/test/files/continuations-neg/ts-1681-nontail-return.check
+++ /dev/null
@@ -1,4 +0,0 @@
-ts-1681-nontail-return.scala:10: error: return expressions in CPS code must be in tail position
- return v
- ^
-one error found
diff --git a/test/files/continuations-neg/ts-1681-nontail-return.scala b/test/files/continuations-neg/ts-1681-nontail-return.scala
deleted file mode 100644
index af86ad304f..0000000000
--- a/test/files/continuations-neg/ts-1681-nontail-return.scala
+++ /dev/null
@@ -1,18 +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 p(i: Int): Int @cpsParam[Unit, Any] = {
- val v= s1 + 3
- if (v == 8)
- return v
- v + 1
- }
-}
-
-object Test extends App {
- val repro = new ReturnRepro
- repro.caller
-}
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
-}