test/tools/javac/cast/6558559/T6558559a.java

Wed, 10 Mar 2010 16:23:18 -0800

author
jjg
date
Wed, 10 Mar 2010 16:23:18 -0800
changeset 525
9871ce4fd56f
parent 229
03bcd66bd8e7
child 554
9d9f26857129
permissions
-rw-r--r--

6933914: fix missing newlines
Reviewed-by: ohair

mcimadamore@187 1 /*
xdono@229 2 * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@187 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@187 4 *
mcimadamore@187 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@187 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@187 7 * published by the Free Software Foundation.
mcimadamore@187 8 *
mcimadamore@187 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@187 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@187 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@187 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@187 13 * accompanied this code).
mcimadamore@187 14 *
mcimadamore@187 15 * You should have received a copy of the GNU General Public License version
mcimadamore@187 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@187 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@187 18 *
mcimadamore@187 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@187 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@187 21 * have any questions.
mcimadamore@187 22 */
mcimadamore@187 23
mcimadamore@187 24 /*
mcimadamore@187 25 * @test
mcimadamore@187 26 * @bug 6558559
mcimadamore@187 27 * @summary Extra "unchecked" diagnostic
mcimadamore@187 28 * @author Maurizio Cimadamore
mcimadamore@187 29 *
mcimadamore@187 30 * @compile T6558559a.java -Xlint:unchecked -Werror
mcimadamore@187 31 */
mcimadamore@187 32
mcimadamore@187 33 class T6558559a {
mcimadamore@187 34 interface A<T> {}
mcimadamore@187 35
mcimadamore@187 36 static class B<T> {}
mcimadamore@187 37
mcimadamore@187 38 A<?> x = null;
mcimadamore@187 39 B<?> y = (B<?>)x;
jjg@525 40 }

mercurial