2223N/A/*
2223N/A * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
2223N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2223N/A *
2223N/A * This code is free software; you can redistribute it and/or modify it
2223N/A * under the terms of the GNU General Public License version 2 only, as
2223N/A * published by the Free Software Foundation.
2223N/A *
2223N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2223N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2223N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2223N/A * version 2 for more details (a copy is included in the LICENSE file that
2223N/A * accompanied this code).
2223N/A *
2223N/A * You should have received a copy of the GNU General Public License version
2223N/A * 2 along with this work; if not, write to the Free Software Foundation,
2223N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2223N/A *
2223N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2223N/A * or visit www.oracle.com if you need additional information or have any
2223N/A * questions.
2223N/A */
2223N/A
2223N/A/*
2223N/A * @test
2223N/A * @bug 4916607
2223N/A * @summary Test casts (legal, warning, and errors)
2223N/A * @author gafter
2223N/A *
2223N/A * @compile/fail CastFail4.java
2223N/A */
2223N/A
2223N/Aimport java.util.*;
2223N/A
2223N/Aclass CastTest {
2223N/A
2223N/A // --- Directly transferring parameters ---
2223N/A
2258N/A private class AA<T> { }
2258N/A
2223N/A private class AB<T> extends AA<T> { }
2223N/A private class AC<T> extends AA<Vector<T>> { }
2223N/A private class AD<T> extends AA<Vector<? extends T>> { }
2223N/A private class AE<T> extends AA<Vector<? super T>> { }
2223N/A private class AF<T> extends AA<T[]> { }
2223N/A private class AG<T> extends AA<String> { }
2223N/A
2223N/A private void parameterTransfer() {
2223N/A Object o;
2223N/A
2223N/A o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
2223N/A }
2223N/A
2223N/A}
2223N/A