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
mcimadamore@155 | 1 | /* |
jjg@384 | 2 | * @test /nodynamiccopyright/ |
mcimadamore@155 | 3 | * @bug 6711619 |
mcimadamore@155 | 4 | * |
mcimadamore@155 | 5 | * @summary javac doesn't allow access to protected members in intersection types |
mcimadamore@155 | 6 | * @author Maurizio Cimadamore |
mcimadamore@155 | 7 | * |
mcimadamore@155 | 8 | * @compile/fail/ref=T6711619b.out -XDrawDiagnostics T6711619b.java |
mcimadamore@155 | 9 | */ |
mcimadamore@155 | 10 | |
mcimadamore@155 | 11 | class T6711619b { |
mcimadamore@155 | 12 | static class X1<E extends X1<E>> { |
mcimadamore@155 | 13 | private int i; |
mcimadamore@155 | 14 | E e; |
mcimadamore@155 | 15 | int f() { |
mcimadamore@155 | 16 | return e.i; |
mcimadamore@155 | 17 | } |
mcimadamore@155 | 18 | } |
mcimadamore@155 | 19 | |
mcimadamore@155 | 20 | static class X2<E extends X2<E>> { |
mcimadamore@155 | 21 | static private int i; |
mcimadamore@155 | 22 | int f() { |
mcimadamore@155 | 23 | return E.i; |
mcimadamore@155 | 24 | } |
mcimadamore@155 | 25 | } |
mcimadamore@155 | 26 | |
mcimadamore@155 | 27 | static class X3<E extends X3<E> & java.io.Serializable> { |
mcimadamore@155 | 28 | private int i; |
mcimadamore@155 | 29 | E e; |
mcimadamore@155 | 30 | int f() { |
mcimadamore@155 | 31 | return e.i; |
mcimadamore@155 | 32 | } |
mcimadamore@155 | 33 | } |
mcimadamore@155 | 34 | |
mcimadamore@155 | 35 | static class X4<E extends X4<E> & java.io.Serializable> { |
mcimadamore@155 | 36 | static private int i; |
mcimadamore@155 | 37 | int f() { |
mcimadamore@155 | 38 | return E.i; |
mcimadamore@155 | 39 | } |
mcimadamore@155 | 40 | } |
jjg@384 | 41 | } |