Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 4613ae7

Browse files
committed
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.
1 parent 1f5584f commit 4613ae7

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

test/pending/run/t3899.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
a,b
2+
a,b
3+
a,b
4+
a,b

test/pending/run/t3899/Base_1.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class Base_1 {
2+
public String[] varargs1(String... as) {
3+
return as;
4+
}
5+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
trait T extends Base_1 {
2+
def t1(as: String*): Array[String] = {
3+
varargs1(as: _*)
4+
}
5+
def t2(as: String*): Array[String] = {
6+
// This is the bug reported in the ticket.
7+
super.varargs1(as: _*)
8+
}
9+
}
10+
11+
class C extends Base_1 {
12+
def c1(as: String*): Array[String] = {
13+
varargs1(as: _*)
14+
}
15+
def c2(as: String*): Array[String] = {
16+
super.varargs1(as: _*)
17+
}
18+
}
19+
20+
21+
object Test extends App {
22+
val t = new T {}
23+
println(t.t1("a", "b").mkString(","))
24+
println(t.t2("a", "b").mkString(","))
25+
26+
val c = new C {}
27+
println(c.c1("a", "b").mkString(","))
28+
println(c.c2("a", "b").mkString(","))
29+
30+
}

0 commit comments

Comments
 (0)