summaryrefslogtreecommitdiff
path: root/test/files/continuations-neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/continuations-neg')
-rw-r--r--test/files/continuations-neg/t5445.check4
-rw-r--r--test/files/continuations-neg/t5445.scala5
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/continuations-neg/t5445.check b/test/files/continuations-neg/t5445.check
new file mode 100644
index 0000000000..eb2943b6a6
--- /dev/null
+++ b/test/files/continuations-neg/t5445.check
@@ -0,0 +1,4 @@
+t5445.scala:4: error: cps annotations not allowed on by-value parameters or value definitions
+ def foo(block: Unit @suspendable ): Unit @suspendable = {}
+ ^
+one error found
diff --git a/test/files/continuations-neg/t5445.scala b/test/files/continuations-neg/t5445.scala
new file mode 100644
index 0000000000..cb6f8f686d
--- /dev/null
+++ b/test/files/continuations-neg/t5445.scala
@@ -0,0 +1,5 @@
+import scala.util.continuations._
+
+object Test {
+ def foo(block: Unit @suspendable ): Unit @suspendable = {}
+}