diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-20 17:23:58 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-20 17:23:58 +0200 |
commit | 4613ae777e349793dba6df47bf278454a8ab124c (patch) | |
tree | 651ba16ab68759b3e5f330311b44403c547d708c /test/pending/run | |
parent | 1f5584fbe183041d4af269278f0125e2f0b94a44 (diff) | |
download | scala-4613ae777e349793dba6df47bf278454a8ab124c.tar.gz scala-4613ae777e349793dba6df47bf278454a8ab124c.tar.bz2 scala-4613ae777e349793dba6df47bf278454a8ab124c.zip |
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.
Diffstat (limited to 'test/pending/run')
-rw-r--r-- | test/pending/run/t3899.check | 4 | ||||
-rw-r--r-- | test/pending/run/t3899/Base_1.java | 5 | ||||
-rw-r--r-- | test/pending/run/t3899/Derived_2.scala | 30 |
3 files changed, 39 insertions, 0 deletions
diff --git a/test/pending/run/t3899.check b/test/pending/run/t3899.check new file mode 100644 index 0000000000..c317608eab --- /dev/null +++ b/test/pending/run/t3899.check @@ -0,0 +1,4 @@ +a,b +a,b +a,b +a,b diff --git a/test/pending/run/t3899/Base_1.java b/test/pending/run/t3899/Base_1.java new file mode 100644 index 0000000000..114cc0b7a6 --- /dev/null +++ b/test/pending/run/t3899/Base_1.java @@ -0,0 +1,5 @@ +public class Base_1 { + public String[] varargs1(String... as) { + return as; + } +} diff --git a/test/pending/run/t3899/Derived_2.scala b/test/pending/run/t3899/Derived_2.scala new file mode 100644 index 0000000000..bb4e53784d --- /dev/null +++ b/test/pending/run/t3899/Derived_2.scala @@ -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(",")) + +} |