mcimadamore@155: /* jjg@384: * @test /nodynamiccopyright/ 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=T6711619a.out -XDrawDiagnostics T6711619a.java mcimadamore@155: */ mcimadamore@155: class T6711619a { mcimadamore@155: mcimadamore@155: static class A { mcimadamore@155: private void a() {} mcimadamore@155: private A a; mcimadamore@155: } mcimadamore@155: static class B extends A { mcimadamore@155: private B b() {} mcimadamore@155: private B b; mcimadamore@155: } mcimadamore@155: static interface I{ mcimadamore@155: void i(); mcimadamore@155: } mcimadamore@155: static interface I1{ mcimadamore@155: void i1(); mcimadamore@155: } mcimadamore@155: static class E extends B implements I, I1{ mcimadamore@155: public void i() {} mcimadamore@155: public void i1() {} mcimadamore@155: } mcimadamore@155: static class C{ mcimadamore@155: T t; mcimadamore@155: W w; mcimadamore@155: C(W w, T t) { mcimadamore@155: this.w = w; mcimadamore@155: this.t = t; mcimadamore@155: } mcimadamore@155: } mcimadamore@155: mcimadamore@155: static void testMemberMethods(C arg) { mcimadamore@155: arg.t.a(); mcimadamore@155: arg.t.b(); mcimadamore@155: } mcimadamore@155: mcimadamore@155: static void testMemberFields(C arg) { mcimadamore@155: A ta; B tb; mcimadamore@155: ta = arg.t.a; mcimadamore@155: tb = arg.t.b; mcimadamore@155: ta = arg.w.a; mcimadamore@155: tb = arg.w.b; mcimadamore@155: } jjg@384: }