From f6b48ea10613b3889a7686eb784a881e31855b4b Mon Sep 17 00:00:00 2001 From: mihaylov Date: Wed, 16 Aug 2006 09:15:09 +0000 Subject: Added test cases for bugs #325 and #676 --- test/files/jvm5/bug676.check | 1 + test/files/jvm5/bug676.scala | 8 ++++++++ test/files/pos/bug325.scala | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 test/files/jvm5/bug676.check create mode 100644 test/files/jvm5/bug676.scala create mode 100644 test/files/pos/bug325.scala (limited to 'test') 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 +} -- cgit v1.2.3