diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-05-18 17:03:54 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-05-18 17:03:54 +0000 |
commit | a3bbcdbfc69004caf2025388f7f6dbb068419968 (patch) | |
tree | dd3c5c16f4543a3fbe5230866ef91f9a0bbc4350 /test/files/pos | |
parent | b081940e5a6faf0f4adbbe32a3e0da97235e3390 (diff) | |
download | scala-a3bbcdbfc69004caf2025388f7f6dbb068419968.tar.gz scala-a3bbcdbfc69004caf2025388f7f6dbb068419968.tar.bz2 scala-a3bbcdbfc69004caf2025388f7f6dbb068419968.zip |
some more ad-hoc cooking
closes #3429
review by odersky
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t3429/A.scala | 12 | ||||
-rw-r--r-- | test/files/pos/t3429/Test.java | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t3429/A.scala b/test/files/pos/t3429/A.scala new file mode 100644 index 0000000000..80785db51d --- /dev/null +++ b/test/files/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
\ No newline at end of file diff --git a/test/files/pos/t3429/Test.java b/test/files/pos/t3429/Test.java new file mode 100644 index 0000000000..e7c57c90c5 --- /dev/null +++ b/test/files/pos/t3429/Test.java @@ -0,0 +1,3 @@ +public @interface Test { + public Class exc() default Exception.class; +}
\ No newline at end of file |