mcimadamore@155: /* mcimadamore@155: * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@155: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@155: * mcimadamore@155: * This code is free software; you can redistribute it and/or modify it mcimadamore@155: * under the terms of the GNU General Public License version 2 only, as mcimadamore@155: * published by the Free Software Foundation. mcimadamore@155: * mcimadamore@155: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@155: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@155: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@155: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@155: * accompanied this code). mcimadamore@155: * mcimadamore@155: * You should have received a copy of the GNU General Public License version mcimadamore@155: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@155: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@155: * mcimadamore@155: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@155: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@155: * have any questions. mcimadamore@155: */ mcimadamore@155: mcimadamore@155: /* mcimadamore@155: * @test mcimadamore@155: * @bug 6711619 mcimadamore@155: * mcimadamore@155: * @summary javac doesn't allow access to protected members in intersection types mcimadamore@155: * @author Maurizio Cimadamore mcimadamore@155: * mcimadamore@155: * @compile/fail/ref=T6711619b.out -XDrawDiagnostics T6711619b.java mcimadamore@155: */ mcimadamore@155: mcimadamore@155: class T6711619b { mcimadamore@155: static class X1> { mcimadamore@155: private int i; mcimadamore@155: E e; mcimadamore@155: int f() { mcimadamore@155: return e.i; mcimadamore@155: } mcimadamore@155: } mcimadamore@155: mcimadamore@155: static class X2> { mcimadamore@155: static private int i; mcimadamore@155: int f() { mcimadamore@155: return E.i; mcimadamore@155: } mcimadamore@155: } mcimadamore@155: mcimadamore@155: static class X3 & java.io.Serializable> { mcimadamore@155: private int i; mcimadamore@155: E e; mcimadamore@155: int f() { mcimadamore@155: return e.i; mcimadamore@155: } mcimadamore@155: } mcimadamore@155: mcimadamore@155: static class X4 & java.io.Serializable> { mcimadamore@155: static private int i; mcimadamore@155: int f() { mcimadamore@155: return E.i; mcimadamore@155: } mcimadamore@155: } mcimadamore@155: }