summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-19 15:01:15 -0800
committerPaul Phillips <paulp@improving.org>2012-02-19 15:01:15 -0800
commit63d9ae6dc4fccc97a35819d69c379073e6342bc1 (patch)
tree1a10c27d3f5ca3b2abcb6276bef5430b709c7c0f /test
parentb0ae549fcc44b068eced8d4af18044f63c2b8093 (diff)
parentb9ac439608eac6fd31082b14bac90064b42521dc (diff)
downloadscala-63d9ae6dc4fccc97a35819d69c379073e6342bc1.tar.gz
scala-63d9ae6dc4fccc97a35819d69c379073e6342bc1.tar.bz2
scala-63d9ae6dc4fccc97a35819d69c379073e6342bc1.zip
Merge remote-tracking branch 'TiarkRompf/SI-5506' into develop
Diffstat (limited to 'test')
-rw-r--r--test/files/continuations-run/t5506.check7
-rw-r--r--test/files/continuations-run/t5506.scala58
2 files changed, 65 insertions, 0 deletions
diff --git a/test/files/continuations-run/t5506.check b/test/files/continuations-run/t5506.check
new file mode 100644
index 0000000000..38b76c63f1
--- /dev/null
+++ b/test/files/continuations-run/t5506.check
@@ -0,0 +1,7 @@
+List(1, 2, 3)
+List(1, 2, 3)
+List(1, 2, 3)
+List(1, 2, 3)
+List(1, 2, 3)
+List(1, 2, 3)
+List(1, 2, 3)
diff --git a/test/files/continuations-run/t5506.scala b/test/files/continuations-run/t5506.scala
new file mode 100644
index 0000000000..2b5c1118f7
--- /dev/null
+++ b/test/files/continuations-run/t5506.scala
@@ -0,0 +1,58 @@
+import scala.util.continuations._
+
+object Test {
+
+def g: List[Int] @suspendable = List(1,2,3)
+
+def fp10: List[Int] @suspendable = {
+g.map(x => x)
+}
+
+def fp11: List[Int] @suspendable = {
+val z = g.map(x => x)
+z
+}
+
+
+def fp12: List[Int] @suspendable = {
+val z = List(1,2,3)
+z.map(x => x)
+}
+
+
+
+def fp20: List[Int] @suspendable = {
+g.map[Int,List[Int]](x => x)
+}
+
+
+def fp21: List[Int] @suspendable = {
+val z = g.map[Int,List[Int]](x => x)
+z
+}
+
+def fp22: List[Int] @suspendable = {
+val z = g.map[Int,List[Int]](x => x)(List.canBuildFrom[Int])
+z
+}
+
+def fp23: List[Int] @suspendable = {
+val z = g.map(x => x)(List.canBuildFrom[Int])
+z
+}
+
+
+def main(args: Array[String]) = {
+ reset {
+ println(fp10)
+ println(fp11)
+ println(fp12)
+
+ println(fp20)
+ println(fp21)
+ println(fp22)
+ println(fp23)
+ }
+}
+
+}