test/tools/javac/OverrideChecks/6738538/T6738538b.java

Thu, 25 Aug 2011 17:18:25 -0700

author
schien
date
Thu, 25 Aug 2011 17:18:25 -0700
changeset 1067
f497fac86cf9
parent 798
4868a36f6fd8
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8-b02 for changeset b3c059de2a61

mcimadamore@134 1 /*
ohair@798 2 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
mcimadamore@134 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@134 4 *
mcimadamore@134 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@134 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@134 7 * published by the Free Software Foundation.
mcimadamore@134 8 *
mcimadamore@134 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@134 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@134 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@134 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@134 13 * accompanied this code).
mcimadamore@134 14 *
mcimadamore@134 15 * You should have received a copy of the GNU General Public License version
mcimadamore@134 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@134 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@134 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@134 22 */
mcimadamore@134 23
mcimadamore@134 24 /*
mcimadamore@134 25 * @test
mcimadamore@134 26 * @bug 6738538 6687444
mcimadamore@134 27 * @summary javac crashes when using a type parameter as a covariant method return type
mcimadamore@134 28 * @author Maurizio Cimadamore
mcimadamore@134 29 *
mcimadamore@134 30 * @compile T6738538b.java
mcimadamore@134 31 */
mcimadamore@134 32
mcimadamore@134 33 class T6738538b {
mcimadamore@134 34 interface I1 {
mcimadamore@134 35 Object m();
mcimadamore@134 36 }
mcimadamore@134 37
mcimadamore@134 38 interface I2 {}
mcimadamore@134 39
mcimadamore@134 40 class C1<T> implements I1 {
mcimadamore@134 41 public T m() {
mcimadamore@134 42 return null;
mcimadamore@134 43 }
mcimadamore@134 44 }
mcimadamore@134 45
mcimadamore@134 46 class C2<T extends C1<?> & I2> {}
jjg@525 47 }

mercurial