summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/jvm5/bug676.check1
-rw-r--r--test/files/jvm5/bug676.scala8
-rw-r--r--test/files/pos/bug325.scala4
3 files changed, 13 insertions, 0 deletions
diff --git a/test/files/jvm5/bug676.check b/test/files/jvm5/bug676.check
new file mode 100644
index 0000000000..5d1c9925f9
--- /dev/null
+++ b/test/files/jvm5/bug676.check
@@ -0,0 +1 @@
+RUNTIME
diff --git a/test/files/jvm5/bug676.scala b/test/files/jvm5/bug676.scala
new file mode 100644
index 0000000000..2ca8083ceb
--- /dev/null
+++ b/test/files/jvm5/bug676.scala
@@ -0,0 +1,8 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ import java.lang.annotation.Retention;
+ val c = classOf[Retention]
+ val r: Retention = c.getAnnotation(c).asInstanceOf[Retention];
+ System.out.println(r.value)
+ }
+}
diff --git a/test/files/pos/bug325.scala b/test/files/pos/bug325.scala
new file mode 100644
index 0000000000..4b13c431b7
--- /dev/null
+++ b/test/files/pos/bug325.scala
@@ -0,0 +1,4 @@
+class Foobar {
+ val foo = "foo";
+ def foo(bar: String): String = foo + bar; // crashes the compiler
+}