diff options
author | vromero <none@none> | 2014-07-04 16:34:44 +0100 |
---|---|---|
committer | vromero <none@none> | 2014-07-04 16:34:44 +0100 |
commit | 8a07e32c76d6408447fefa34e8bd974434ae4dda (patch) | |
tree | 82351cb836ba684a2f456b43ed41398eb8ec8cb0 /test | |
parent | 202eb3e4f8bc099b2ab5f7c8783b45e931958bf1 (diff) |
8049075: javac, wildcards and generic vararg method invocation not accepted
Reviewed-by: mcimadamore
Diffstat (limited to 'test')
-rw-r--r-- | test/tools/javac/varargs/T8049075/VarargsAndWildcardParameterizedTypeTest.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/tools/javac/varargs/T8049075/VarargsAndWildcardParameterizedTypeTest.java b/test/tools/javac/varargs/T8049075/VarargsAndWildcardParameterizedTypeTest.java new file mode 100644 index 00000000..c9618766 --- /dev/null +++ b/test/tools/javac/varargs/T8049075/VarargsAndWildcardParameterizedTypeTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8049075 + * @summary javac, wildcards and generic vararg method invocation not accepted + * @compile VarargsAndWildcardParameterizedTypeTest.java + */ + +class VarargsAndWildcardParameterizedTypeTest { + interface I<T> { + String m(T... t); + } + + void m() { + I<? super Integer> i = null; + i.m(Integer.valueOf(1), Integer.valueOf(1)); + } +} |