Thu, 21 Feb 2013 15:27:05 +0000
8008444: Inherited generic functional descriptors are merged incorrectly
Summary: Missing call to Types.createMethodWithThrownTypes
Reviewed-by: jjg
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6711619
4 *
5 * @summary javac doesn't allow access to protected members in intersection types
6 * @author Maurizio Cimadamore
7 *
8 * @compile/fail/ref=T6711619b.out -XDrawDiagnostics T6711619b.java
9 */
11 class T6711619b {
12 static class X1<E extends X1<E>> {
13 private int i;
14 E e;
15 int f() {
16 return e.i;
17 }
18 }
20 static class X2<E extends X2<E>> {
21 static private int i;
22 int f() {
23 return E.i;
24 }
25 }
27 static class X3<E extends X3<E> & java.io.Serializable> {
28 private int i;
29 E e;
30 int f() {
31 return e.i;
32 }
33 }
35 static class X4<E extends X4<E> & java.io.Serializable> {
36 static private int i;
37 int f() {
38 return E.i;
39 }
40 }
41 }