T4972073a.java revision 553:9d9f26857129
1109998Smarkm/* 2160814Ssimon * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 3160814Ssimon * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4160814Ssimon * 5109998Smarkm * This code is free software; you can redistribute it and/or modify it 6194206Ssimon * under the terms of the GNU General Public License version 2 only, as 7109998Smarkm * published by the Free Software Foundation. 8109998Smarkm * 9109998Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT 10109998Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11109998Smarkm * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12109998Smarkm * version 2 for more details (a copy is included in the LICENSE file that 13280297Sjkim * accompanied this code). 14109998Smarkm * 15109998Smarkm * You should have received a copy of the GNU General Public License version 16109998Smarkm * 2 along with this work; if not, write to the Free Software Foundation, 17109998Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18109998Smarkm * 19109998Smarkm * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20109998Smarkm * or visit www.oracle.com if you need additional information or have any 21109998Smarkm * questions. 22109998Smarkm */ 23109998Smarkm 24109998Smarkm/* 25109998Smarkm * @test 26109998Smarkm * @bug 4972073 27109998Smarkm * @summary same interface allowed twice in compound type 28109998Smarkm * @compile/fail T4972073a.java 29109998Smarkm */ 30109998Smarkm 31109998Smarkmpublic class T4972073a { 32109998Smarkm 33109998Smarkm static class D {} 34109998Smarkm 35109998Smarkm static interface MyInterface<E> { 36109998Smarkm public String foo(); 37109998Smarkm } 38109998Smarkm 39109998Smarkm static class MyClass {} 40109998Smarkm 41109998Smarkm static class Sun1 extends MyClass implements MyInterface<Sun1>, MyInterface<Sun1> { 42109998Smarkm public String foo() { 43109998Smarkm return "test"; 44109998Smarkm } 45109998Smarkm } 46109998Smarkm} 47109998Smarkm