aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t3429
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t3429')
-rw-r--r--tests/untried/pos/t3429/A.scala12
-rw-r--r--tests/untried/pos/t3429/Test.java3
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/pos/t3429/A.scala b/tests/untried/pos/t3429/A.scala
new file mode 100644
index 000000000..ea89af168
--- /dev/null
+++ b/tests/untried/pos/t3429/A.scala
@@ -0,0 +1,12 @@
+class A {
+ @Test(exc = classOf[Exception])
+ def myTestMethod = 0
+}
+// rytz@chara:~/scala/trunk/sandbox$ javac Test.java
+// rytz@chara:~/scala/trunk/sandbox$ ../build/pack/bin/scalac A.scala
+// A.scala:2: error: type mismatch;
+// found : java.lang.Class[Exception](classOf[java.lang.Exception])
+// required: java.lang.Class
+// @Test(exc = classOf[Exception])
+// ^
+// one error found
diff --git a/tests/untried/pos/t3429/Test.java b/tests/untried/pos/t3429/Test.java
new file mode 100644
index 000000000..e7c57c90c
--- /dev/null
+++ b/tests/untried/pos/t3429/Test.java
@@ -0,0 +1,3 @@
+public @interface Test {
+ public Class exc() default Exception.class;
+} \ No newline at end of file