Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasikanth Bharadwaj2014-08-04 05:52:53 +0000
committerssankaran2014-08-04 05:52:53 +0000
commit3b3bb74598b16537e8819313b01884889effdbd2 (patch)
tree6dd87765fff261790587dbbd9d5a18b1abb38948 /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
parent96aefcf71308a63ca037558f00b8c7e24e992667 (diff)
downloadeclipse.jdt.core-3b3bb74598b16537e8819313b01884889effdbd2.tar.gz
eclipse.jdt.core-3b3bb74598b16537e8819313b01884889effdbd2.tar.xz
eclipse.jdt.core-3b3bb74598b16537e8819313b01884889effdbd2.zip
Regression test for Bug 436474 - [codegen]Problem with varargs and
List.toString Signed-off-by: Sasikanth Bharadwaj <saammana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
index 8b579e0455..868caa9156 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
@@ -3465,4 +3465,24 @@ public class VarargsTest extends AbstractComparableTest {
"The method foo(A...) of type B is not applicable as the formal varargs element type A is not accessible here\n" +
"----------\n"); // check and adjust,
}
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=436474, [codegen]Problem with varargs and List.toString
+ public void test436474() {
+ runConformTest(
+ new String[] {
+ "Scratch.java",
+ "import java.util.Arrays;\n" +
+ "import java.util.List;\n" +
+ "public class Scratch {\n" +
+ " public static void vararg(String... strs) {\n" +
+ " System.out.println(strs[0]);\n" +
+ " }\n" +
+ " \n" +
+ " public static void main(String[] args) {\n" +
+ " List<String> l = Arrays.asList(\"a\");\n" +
+ " vararg(l.toArray(new String[0]));\n" +
+ " }\n" +
+ "}",
+ },
+ "a");
+ }
} \ No newline at end of file

Back to the top