summaryrefslogtreecommitdiff
path: root/test/files/pos/annotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/annotations.scala')
-rw-r--r--test/files/pos/annotations.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/annotations.scala b/test/files/pos/annotations.scala
new file mode 100644
index 0000000000..d96c8e0c6a
--- /dev/null
+++ b/test/files/pos/annotations.scala
@@ -0,0 +1,12 @@
+class ann(i: Int) extends Annotation
+
+object Test {
+
+ // bug #1028
+ val x = 1
+ @ann(x) val a = ()
+ @ann({val y = 2; y}) val b = ()
+
+ def c: Int @ann(x) = 1
+ def d: String @ann({val z = 0; z - 1}) = "2"
+}