aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/annot-nonconst.check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/annot-nonconst.check')
-rw-r--r--tests/untried/neg/annot-nonconst.check18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/untried/neg/annot-nonconst.check b/tests/untried/neg/annot-nonconst.check
new file mode 100644
index 000000000..5b3da7a13
--- /dev/null
+++ b/tests/untried/neg/annot-nonconst.check
@@ -0,0 +1,18 @@
+annot-nonconst.scala:1: warning: Implementation restriction: subclassing Classfile does not
+make your annotation visible at runtime. If that is what
+you want, you must write the annotation class in Java.
+class Length(value: Int) extends annotation.ClassfileAnnotation
+ ^
+annot-nonconst.scala:2: warning: Implementation restriction: subclassing Classfile does not
+make your annotation visible at runtime. If that is what
+you want, you must write the annotation class in Java.
+class Ann2(value: String) extends annotation.ClassfileAnnotation
+ ^
+annot-nonconst.scala:6: error: annotation argument needs to be a constant; found: Test.this.n
+ @Length(n) def foo = "foo"
+ ^
+annot-nonconst.scala:7: error: annotation argument cannot be null
+ @Ann2(null) def bar = "bar"
+ ^
+two warnings found
+two errors found