test/tools/javac/generics/typevars/6804733/T6804733.java

Thu, 05 Mar 2009 17:24:40 +0000

author
mcimadamore
date
Thu, 05 Mar 2009 17:24:40 +0000
changeset 236
84a18d7da478
child 384
ed31953ca025
permissions
-rw-r--r--

6804733: javac generates spourious diagnostics for ill-formed type-variable bounds
Summary: fixed algorithm for checking cycles in typevar declarations
Reviewed-by: jjg

mcimadamore@236 1 /*
mcimadamore@236 2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@236 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@236 4 *
mcimadamore@236 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@236 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@236 7 * published by the Free Software Foundation.
mcimadamore@236 8 *
mcimadamore@236 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@236 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@236 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@236 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@236 13 * accompanied this code).
mcimadamore@236 14 *
mcimadamore@236 15 * You should have received a copy of the GNU General Public License version
mcimadamore@236 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@236 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@236 18 *
mcimadamore@236 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@236 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@236 21 * have any questions.
mcimadamore@236 22 */
mcimadamore@236 23
mcimadamore@236 24 /*
mcimadamore@236 25 * @test
mcimadamore@236 26 * @bug 6804733
mcimadamore@236 27 * @summary javac generates spourious diagnostics for ill-formed type-variable bounds
mcimadamore@236 28 * @author mcimadamore
mcimadamore@236 29 * @compile/fail/ref=T6804733.out -XDrawDiagnostics T6804733.java
mcimadamore@236 30 */
mcimadamore@236 31
mcimadamore@236 32 import java.util.ArrayList;
mcimadamore@236 33 class T6804733<S> extends ArrayList<S> {
mcimadamore@236 34 <T extends S & S> void m() {}
mcimadamore@236 35 }

mercurial