summaryrefslogtreecommitdiff
path: root/test/files/neg/annot-nonconst.check
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-10-02 16:58:39 +0000
committerLex Spoon <lex@lexspoon.org>2007-10-02 16:58:39 +0000
commit2a22d4156be506278141446ddd3729aea26ab77f (patch)
tree9c8fce62aa7f032a302510bc0d737cce414f3d7b /test/files/neg/annot-nonconst.check
parent40884972d9de5933503cd1f75c1a8f42360a8b62 (diff)
downloadscala-2a22d4156be506278141446ddd3729aea26ab77f.tar.gz
scala-2a22d4156be506278141446ddd3729aea26ab77f.tar.bz2
scala-2a22d4156be506278141446ddd3729aea26ab77f.zip
Emit a warning if a user tries to define
their own subclass of ClassfileAnnotation
Diffstat (limited to 'test/files/neg/annot-nonconst.check')
-rw-r--r--test/files/neg/annot-nonconst.check6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/neg/annot-nonconst.check b/test/files/neg/annot-nonconst.check
index 197ff930a5..ef1a72adf2 100644
--- a/test/files/neg/annot-nonconst.check
+++ b/test/files/neg/annot-nonconst.check
@@ -1,4 +1,10 @@
+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(n: Int) extends ClassfileAnnotation
+ ^
annot-nonconst.scala:5: error: attribute argument needs to be a constant; found: Test.this.n
@Length(n) def foo = "foo"
^
+one warning found
one error found