Fri, 29 Apr 2011 16:06:28 +0100
6550655: com.sun.tools.javac.code.Symbol$CompletionFailure
Summary: Accessing a non-existing enum constant from an annotation whose class is available results in an internal error
Reviewed-by: jjg
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 T6738538a.java |
mcimadamore@134 | 31 | */ |
mcimadamore@134 | 32 | |
mcimadamore@134 | 33 | class T6738538a { |
mcimadamore@134 | 34 | |
mcimadamore@134 | 35 | class C<T> { |
mcimadamore@134 | 36 | public T m(){ |
mcimadamore@134 | 37 | return null; |
mcimadamore@134 | 38 | } |
mcimadamore@134 | 39 | } |
mcimadamore@134 | 40 | interface I<T>{ |
mcimadamore@134 | 41 | public T m(); |
mcimadamore@134 | 42 | } |
mcimadamore@134 | 43 | class Crash<T extends C<?> & I> {} |
jjg@525 | 44 | } |