test/tools/javac/varargs/access/VarargsAndWildcardParameterizedTypeTest4.java

Mon, 26 Oct 2015 13:23:30 -0700

author
asaha
date
Mon, 26 Oct 2015 13:23:30 -0700
changeset 2999
683b3e7e05a7
parent 2788
f08330fad341
permissions
-rw-r--r--

Added tag jdk8u76-b00 for changeset 10ffafaf5340

vromero@2535 1 /*
dlsmith@2788 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
vromero@2535 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
vromero@2535 4 *
vromero@2535 5 * This code is free software; you can redistribute it and/or modify it
vromero@2535 6 * under the terms of the GNU General Public License version 2 only, as
vromero@2535 7 * published by the Free Software Foundation.
vromero@2535 8 *
vromero@2535 9 * This code is distributed in the hope that it will be useful, but WITHOUT
vromero@2535 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
vromero@2535 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
vromero@2535 12 * version 2 for more details (a copy is included in the LICENSE file that
vromero@2535 13 * accompanied this code).
vromero@2535 14 *
vromero@2535 15 * You should have received a copy of the GNU General Public License version
vromero@2535 16 * 2 along with this work; if not, write to the Free Software Foundation,
vromero@2535 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
vromero@2535 18 *
vromero@2535 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
vromero@2535 20 * or visit www.oracle.com if you need additional information or have any
vromero@2535 21 * questions.
vromero@2535 22 */
vromero@2535 23
vromero@2535 24 /*
vromero@2535 25 * @test
dlsmith@2788 26 * @bug 8075520
dlsmith@2788 27 * @summary Varargs access check mishandles capture variables
dlsmith@2788 28 * @compile VarargsAndWildcardParameterizedTypeTest4.java
dlsmith@2788 29 * @compile -source 8 VarargsAndWildcardParameterizedTypeTest4.java
dlsmith@2788 30 * @compile -source 7 VarargsAndWildcardParameterizedTypeTest4.java
vromero@2535 31 */
vromero@2535 32
dlsmith@2788 33 class VarargsAndWildcardParameterizedTypeTest2 {
dlsmith@2788 34 interface I {
dlsmith@2788 35 <T> void m(Box<T> iter, T... t);
vromero@2535 36 }
vromero@2535 37
dlsmith@2788 38 interface Box<T> {}
dlsmith@2788 39
dlsmith@2788 40 void m(I i, Box<? extends Number> b) {
dlsmith@2788 41 i.m(b);
vromero@2535 42 }
vromero@2535 43 }

mercurial