diff options
author | Martin Odersky <odersky@gmail.com> | 2008-05-20 20:31:20 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-05-20 20:31:20 +0000 |
commit | 00e18ddfec3d3d592b5a140af3a73e4c06a135fe (patch) | |
tree | 0142cbb81eafb673eecb1ec8ace361d89818afd0 /test/files/jvm5 | |
parent | 2c7e43ae7adc82438924c2dba9fd725c216c3048 (diff) | |
download | scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.tar.gz scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.tar.bz2 scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.zip |
1) Fix in backend to print meaningful filenames...
1) Fix in backend to print meaningful filenames (previously it was
"[wrote DataOutputStream@6747]" 2) Treat java varargs as Scala varargs
3) Allow parsing of Java source files
Diffstat (limited to 'test/files/jvm5')
-rw-r--r-- | test/files/jvm5/annotations.scala | 14 | ||||
-rw-r--r-- | test/files/jvm5/throws-annot.scala | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/files/jvm5/annotations.scala b/test/files/jvm5/annotations.scala index 98b82edad4..9af2d333ba 100644 --- a/test/files/jvm5/annotations.scala +++ b/test/files/jvm5/annotations.scala @@ -4,7 +4,7 @@ object Test1 { def foo: Unit = () } def run { - val method = classOf[Foo].getMethod("foo", Array()) + val method = classOf[Foo].getMethod("foo") method.getExceptionTypes foreach println } } @@ -18,7 +18,7 @@ object Test2 { def read() = in.read() } def run { - val method = classOf[Reader].getMethod("read", Array()) + val method = classOf[Reader].getMethod("read") method.getExceptionTypes foreach println } } @@ -41,7 +41,7 @@ object Test3 { def foo: Unit = () } def run { - val method = classOf[Foo].getMethod("foo", Array()) + val method = classOf[Foo].getMethod("foo") val annotation = method.getAnnotation(classOf[Deprecated]) println(annotation) } @@ -133,12 +133,12 @@ object Test5 { private var count: Integer = 0 private val getter = - getClass().getMethod("getCount", Array[java.lang.Class[T] forSome { type T }]()) + getClass().getMethod("getCount") private val setter = - getClass().getMethod("setCount", Array(classOf[Integer])) + getClass().getMethod("setCount", classOf[Integer]) - def get = getter.invoke(this, Array()).asInstanceOf[Integer].intValue - def set(n: Int) = setter.invoke(this, Array(new Integer(n))) + def get = getter.invoke(this).asInstanceOf[Integer].intValue + def set(n: Int) = setter.invoke(this, new Integer(n)) } def run { val count = new Count diff --git a/test/files/jvm5/throws-annot.scala b/test/files/jvm5/throws-annot.scala index 5f4dac07e8..90b58b9976 100644 --- a/test/files/jvm5/throws-annot.scala +++ b/test/files/jvm5/throws-annot.scala @@ -27,7 +27,7 @@ object TestThrows { } def checkMethod(cls: Class[_], name: String) { - val method = cls.getMethod(name, Array()) + val method = cls.getMethod(name) println(name + " throws: " + method.getExceptionTypes.mkString("", ", ", "")) println(name + " annotations: " + method.getDeclaredAnnotations.mkString("", ", ", "")) } |