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 6885255
4 * @summary -Xlint:rawtypes
5 * @compile/ref=T6885255.out -XDrawDiagnostics -Xlint:rawtypes T6885255.java
6 */
8 class T6885255 {
10 static class Test<X, Y> {}
12 Class<Test> ct; //no warn - outer Class w/ raw param
13 Class<Test<Test, Test>> ctt; //warn - outer Class w/o raw param (2)
15 Class<Class<Test>> cct; //warn - outer Class w/o raw param
16 Class<Class<Test<Test, Test>>> cctt; //warn - outer Class w/o raw param (2)
18 Object o1 = (Test)null; //no warn - outer raw and cast
19 Object o2 = (Test<Test, Test>)null; //warn - inner raw (2)
21 Object o3 = (Class)null; //no warn - outer raw and cast
22 Object o4 = (Class<Test>)null; //no warn - outer Class w/ raw param
24 Object o5 = (Class<Test<Test, Test>>)null; //warn - outer Class w/ non raw param (2)
25 Object o6 = (Class<Class<Test<Test, Test>>>)null; //warn - outer Class w/ non raw param (2)
27 Object o7 = (Test<Class, Class>)null; //warn - inner raw (2)
28 Object o8 = (Test<Class<Test>, Class<Test>>)null; //warn - inner Class (2)
30 boolean b = null instanceof Test; //no warn - raw and instanceof
31 }