mcimadamore@185: /* mcimadamore@185: * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@185: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@185: * mcimadamore@185: * This code is free software; you can redistribute it and/or modify it mcimadamore@185: * under the terms of the GNU General Public License version 2 only, as mcimadamore@185: * published by the Free Software Foundation. mcimadamore@185: * mcimadamore@185: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@185: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@185: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@185: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@185: * accompanied this code). mcimadamore@185: * mcimadamore@185: * You should have received a copy of the GNU General Public License version mcimadamore@185: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@185: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@185: * mcimadamore@185: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@185: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@185: * have any questions. mcimadamore@185: */ mcimadamore@185: mcimadamore@185: /* mcimadamore@185: * @test mcimadamore@185: * @author Maurizio Cimadamore mcimadamore@185: * @bug 6665356 mcimadamore@185: * @summary Cast not allowed when both qualifying type and inner class are parameterized mcimadamore@185: * @compile/fail/ref=T6665356.out -XDrawDiagnostics T6665356.java mcimadamore@185: */ mcimadamore@185: mcimadamore@185: class T6665356 { mcimadamore@185: class Outer { mcimadamore@185: class Inner {} mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast1(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast2(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast3(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast4(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast5(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast6(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast7(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast8(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast9(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast10(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: mcimadamore@185: void cast11(Outer.Inner p) { mcimadamore@185: Object o = (Outer.Inner)p; mcimadamore@185: } mcimadamore@185: }