Permalink
Browse files

Merge pull request #590 from retronym/ticket/3899

Pending test for SI-3899.
  • Loading branch information...
2 parents 4b01e1f + 4613ae7 commit 1cd9f5b8952341f7131eb637419f2415b7e518df @adriaanm adriaanm committed May 21, 2012
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 1cd9f5b

Please sign in to comment.