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

mercurial