test/tools/javac/capture/T6594284.java

Mon, 29 Sep 2008 12:00:29 +0100

author
mcimadamore
date
Mon, 29 Sep 2008 12:00:29 +0100
changeset 122
1a9276e7cb18
parent 79
36df13bde238
child 554
9d9f26857129
permissions
-rw-r--r--

6747671: -Xlint:rawtypes
Summary: add an Xlint option for detecting all raw types usages (ccc-approved)
Reviewed-by: jjg

mcimadamore@79 1 /*
mcimadamore@79 2 * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@79 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@79 4 *
mcimadamore@79 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@79 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@79 7 * published by the Free Software Foundation.
mcimadamore@79 8 *
mcimadamore@79 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@79 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@79 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@79 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@79 13 * accompanied this code).
mcimadamore@79 14 *
mcimadamore@79 15 * You should have received a copy of the GNU General Public License version
mcimadamore@79 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@79 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@79 18 *
mcimadamore@79 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@79 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@79 21 * have any questions.
mcimadamore@79 22 */
mcimadamore@79 23
mcimadamore@79 24 /*
mcimadamore@79 25 * @test
mcimadamore@79 26 * @bug 6594284
mcimadamore@79 27 * @summary NPE thrown when calling a method on an intersection type
mcimadamore@79 28 * @author Maurizio Cimadamore
mcimadamore@79 29 *
mcimadamore@79 30 * @compile/fail T6594284.java
mcimadamore@79 31 */
mcimadamore@79 32
mcimadamore@79 33 public class T6594284 {
mcimadamore@79 34 class A{ public void a(){}}
mcimadamore@79 35 class B extends A{ public void b(){}}
mcimadamore@79 36 interface I{ void i();}
mcimadamore@79 37 interface I1 { void i1(); }
mcimadamore@79 38 class E extends B implements I{ public void i(){};}
mcimadamore@79 39
mcimadamore@79 40 class C<W extends B & I1, T extends W>{
mcimadamore@79 41 C<? extends I, ? extends E> arg;
mcimadamore@79 42 }
mcimadamore@79 43 }

mercurial