CastWarn12.java revision 288
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * This code is free software; you can redistribute it and/or modify it
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * under the terms of the GNU General Public License version 2 only, as
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * published by the Free Software Foundation.
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * This code is distributed in the hope that it will be useful, but WITHOUT
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * version 2 for more details (a copy is included in the LICENSE file that
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * accompanied this code).
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * You should have received a copy of the GNU General Public License version
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * 2 along with this work; if not, write to the Free Software Foundation,
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
658280b6253b61dbb155f43d0e3cbcffa85ccb90David Hollister * CA 95054 USA or visit www.sun.com if you need additional information or
658280b6253b61dbb155f43d0e3cbcffa85ccb90David Hollister * have any questions.
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * @bug 4916607
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * @summary Test casts (legal, warning, and errors)
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * @author gafter
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh * @compile/fail -Werror -Xlint:unchecked CastWarn12.java
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh // --- Disjoint ---
4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6dh private interface DA<T> { }
73a3eccd27d9673a6407274ea0de350699562fd9David Hollister private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {