test/tools/javac/capture/T6594284.java

Tue, 28 Dec 2010 15:54:52 -0800

author
ohair
date
Tue, 28 Dec 2010 15:54:52 -0800
changeset 798
4868a36f6fd8
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

6962318: Update copyright year
Reviewed-by: xdono

mcimadamore@79 1 /*
ohair@554 2 * Copyright (c) 2008, Oracle and/or its affiliates. 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 *
ohair@554 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 20 * or visit www.oracle.com if you need additional information or have any
ohair@554 21 * 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