summaryrefslogtreecommitdiff
path: root/test/files/run/t5125.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t5125.scala')
-rw-r--r--test/files/run/t5125.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/t5125.scala b/test/files/run/t5125.scala
new file mode 100644
index 0000000000..7ec2b929d9
--- /dev/null
+++ b/test/files/run/t5125.scala
@@ -0,0 +1,24 @@
+object O1 {
+ def instance = this
+ @scala.annotation.varargs
+ def f(values:String*) = println("Calling O1.f(): " + values)
+}
+
+object O2 {
+ def instance = this
+ @scala.annotation.varargs
+ def f(values:String*) = println("Calling O2.f(): " + values)
+ // uncommenting g() results in errors in A.java
+ def g(): String => Int = s => s.hashCode
+}
+
+object Test extends App {
+ def check(c: Class[_]) {
+ val methodName = "f"
+ val methods = c.getDeclaredMethods.filter(_.getName == methodName)
+ println(methods.map(_.toString).sorted.mkString("\n"))
+ }
+
+ check(O1.getClass)
+ check(O2.getClass)
+} \ No newline at end of file