T.java revision 3346:bcf9765e73b1
157416Smarkm/* 257416Smarkm * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. 357416Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 457416Smarkm * 557416Smarkm * This code is free software; you can redistribute it and/or modify it 657416Smarkm * under the terms of the GNU General Public License version 2 only, as 757416Smarkm * published by the Free Software Foundation. 857416Smarkm * 957416Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT 1057416Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1157416Smarkm * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1257416Smarkm * version 2 for more details (a copy is included in the LICENSE file that 1357416Smarkm * accompanied this code). 1457416Smarkm * 1557416Smarkm * You should have received a copy of the GNU General Public License version 1657416Smarkm * 2 along with this work; if not, write to the Free Software Foundation, 1757416Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1857416Smarkm * 1957416Smarkm * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2057416Smarkm * or visit www.oracle.com if you need additional information or have any 2157416Smarkm * questions. 2257416Smarkm */ 2357416Smarkm 2457416Smarkm/** 2557416Smarkm * @test 2657416Smarkm * @bug 6547131 2757416Smarkm * @summary java.lang.ClassFormatError when using old collection API 2857416Smarkm * @compile p/Outer.jasm p/Outer$I.jasm T.java 2957416Smarkm * @run main T 3057416Smarkm */ 3157416Smarkm 3257416Smarkmimport p.*; 3357416Smarkm 3457416Smarkmclass SubI implements Outer.I { 3557416Smarkm SubI() { } 3657416Smarkm Outer.I getI() { return this; } 3757416Smarkm} 3857416Smarkm 3957416Smarkmpublic class T { 4057416Smarkm public static void main(String argv[]){ 41102644Snectar SubI sub = new SubI(); 4257416Smarkm Outer.I inter = (Outer.I)sub.getI(); 4357416Smarkm } 4457416Smarkm} 4557416Smarkm