VarargsAndWildcardParameterizedTypeTest2.java revision 2881:5cd4dba2e742
162484Scg/*
262484Scg * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
362484Scg * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
462484Scg *
562484Scg * This code is free software; you can redistribute it and/or modify it
662484Scg * under the terms of the GNU General Public License version 2 only, as
762484Scg * published by the Free Software Foundation.
862484Scg *
962484Scg * This code is distributed in the hope that it will be useful, but WITHOUT
1062484Scg * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1162484Scg * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1262484Scg * version 2 for more details (a copy is included in the LICENSE file that
1362484Scg * accompanied this code).
1462484Scg *
1562484Scg * You should have received a copy of the GNU General Public License version
1662484Scg * 2 along with this work; if not, write to the Free Software Foundation,
1762484Scg * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1862484Scg *
1962484Scg * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2062484Scg * or visit www.oracle.com if you need additional information or have any
2162484Scg * questions.
2262484Scg */
2362484Scg
2462484Scg/*
2562484Scg * @test
2662484Scg * @bug 8075520
2762484Scg * @summary Varargs access check mishandles capture variables
2862484Scg * @compile VarargsAndWildcardParameterizedTypeTest2.java
2962484Scg * @compile -source 8 VarargsAndWildcardParameterizedTypeTest2.java
3062484Scg * @compile -source 7 VarargsAndWildcardParameterizedTypeTest2.java
3162484Scg */
3262484Scg
3362484Scgclass VarargsAndWildcardParameterizedTypeTest2 {
3462484Scg    interface I {
3562484Scg        <T> void m(T... t);
3662484Scg    }
3762484Scg
3862484Scg    interface Box<T> {
3962484Scg        T get();
4062484Scg    }
4162484Scg
4262484Scg    void m(I i, Box<? extends Number> b) {
4362484Scg        i.m(b.get());
4462484Scg    }
4562484Scg}
4662484Scg