Permalink
Browse files

Pending test for SI-3899.

The super accessor for the Java varargs method impedes Uncurry's
efforts to convert repeated arguments to an Array. I'm not sure how
to fix that.
  • Loading branch information...
retronym committed May 20, 2012
1 parent 1f5584f commit 4613ae777e349793dba6df47bf278454a8ab124c
Showing with 39 additions and 0 deletions.
  1. +4 −0 test/pending/run/t3899.check
  2. +5 −0 test/pending/run/t3899/Base_1.java
  3. +30 −0 test/pending/run/t3899/Derived_2.scala
@@ -0,0 +1,4 @@
a,b
a,b
a,b
a,b
@@ -0,0 +1,5 @@
public class Base_1 {
public String[] varargs1(String... as) {
return as;
}
}
@@ -0,0 +1,30 @@
trait T extends Base_1 {
def t1(as: String*): Array[String] = {
varargs1(as: _*)
}
def t2(as: String*): Array[String] = {
// This is the bug reported in the ticket.
super.varargs1(as: _*)
}
}
class C extends Base_1 {
def c1(as: String*): Array[String] = {
varargs1(as: _*)
}
def c2(as: String*): Array[String] = {
super.varargs1(as: _*)
}
}
object Test extends App {
val t = new T {}
println(t.t1("a", "b").mkString(","))
println(t.t2("a", "b").mkString(","))
val c = new C {}
println(c.c1("a", "b").mkString(","))
println(c.c2("a", "b").mkString(","))
}

0 comments on commit 4613ae7

Please sign in to comment.