From 3ba0e87fed08f64066bf3412580fcdf635762f31 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Sun, 5 Jul 2009 07:19:02 +0000 Subject: fix #2122, test for #2116 --- test/files/neg/annot-nonconst.check | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'test/files/neg/annot-nonconst.check') diff --git a/test/files/neg/annot-nonconst.check b/test/files/neg/annot-nonconst.check index bc6a0d2c48..23429bb11a 100644 --- a/test/files/neg/annot-nonconst.check +++ b/test/files/neg/annot-nonconst.check @@ -3,8 +3,16 @@ 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 ClassfileAnnotation ^ -annot-nonconst.scala:5: error: annotation argument needs to be a constant; found: n +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 ClassfileAnnotation + ^ +annot-nonconst.scala:6: error: annotation argument needs to be a constant; found: n @Length(n) def foo = "foo" ^ -one warning found -one error found +annot-nonconst.scala:7: error: annotation argument needs to be a constant; found: null + @Ann2(null) def bar = "bar" + ^ +two warnings found +two errors found -- cgit v1.2.3