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@731 | 1 | /* |
mcimadamore@731 | 2 | * @test /nodynamiccopyright/ |
mcimadamore@914 | 3 | * @bug 6939780 7020044 |
mcimadamore@731 | 4 | * |
mcimadamore@731 | 5 | * @summary add a warning to detect diamond sites |
mcimadamore@731 | 6 | * @author mcimadamore |
mcimadamore@731 | 7 | * @compile/ref=T6939780.out T6939780.java -XDrawDiagnostics -XDfindDiamond |
mcimadamore@731 | 8 | * |
mcimadamore@731 | 9 | */ |
mcimadamore@731 | 10 | |
mcimadamore@731 | 11 | class T6939780 { |
mcimadamore@731 | 12 | |
mcimadamore@731 | 13 | void test() { |
mcimadamore@731 | 14 | class Foo<X extends Number> { |
mcimadamore@731 | 15 | Foo() {} |
mcimadamore@731 | 16 | Foo(X x) {} |
mcimadamore@731 | 17 | } |
mcimadamore@731 | 18 | Foo<Number> f1 = new Foo<Number>(1); |
mcimadamore@731 | 19 | Foo<?> f2 = new Foo<Number>(); |
mcimadamore@731 | 20 | Foo<?> f3 = new Foo<Integer>(); |
mcimadamore@731 | 21 | Foo<Number> f4 = new Foo<Number>(1) {}; |
mcimadamore@731 | 22 | Foo<?> f5 = new Foo<Number>() {}; |
mcimadamore@731 | 23 | Foo<?> f6 = new Foo<Integer>() {}; |
mcimadamore@731 | 24 | } |
mcimadamore@731 | 25 | } |