Thu, 21 Feb 2013 14:43:51 -0800
8008405: Now that metafactory is in place, add javac lambda serialization tests
Summary: Tests part of original langtools serialization review.
Reviewed-by: mcimadamore
aoqi@0 | 1 | /** |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6885255 |
aoqi@0 | 4 | * @summary -Xlint:rawtypes |
aoqi@0 | 5 | * @compile/ref=T6885255.out -XDrawDiagnostics -Xlint:rawtypes T6885255.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | |
aoqi@0 | 8 | class T6885255 { |
aoqi@0 | 9 | |
aoqi@0 | 10 | static class Test<X, Y> {} |
aoqi@0 | 11 | |
aoqi@0 | 12 | Class<Test> ct; //no warn - outer Class w/ raw param |
aoqi@0 | 13 | Class<Test<Test, Test>> ctt; //warn - outer Class w/o raw param (2) |
aoqi@0 | 14 | |
aoqi@0 | 15 | Class<Class<Test>> cct; //warn - outer Class w/o raw param |
aoqi@0 | 16 | Class<Class<Test<Test, Test>>> cctt; //warn - outer Class w/o raw param (2) |
aoqi@0 | 17 | |
aoqi@0 | 18 | Object o1 = (Test)null; //no warn - outer raw and cast |
aoqi@0 | 19 | Object o2 = (Test<Test, Test>)null; //warn - inner raw (2) |
aoqi@0 | 20 | |
aoqi@0 | 21 | Object o3 = (Class)null; //no warn - outer raw and cast |
aoqi@0 | 22 | Object o4 = (Class<Test>)null; //no warn - outer Class w/ raw param |
aoqi@0 | 23 | |
aoqi@0 | 24 | Object o5 = (Class<Test<Test, Test>>)null; //warn - outer Class w/ non raw param (2) |
aoqi@0 | 25 | Object o6 = (Class<Class<Test<Test, Test>>>)null; //warn - outer Class w/ non raw param (2) |
aoqi@0 | 26 | |
aoqi@0 | 27 | Object o7 = (Test<Class, Class>)null; //warn - inner raw (2) |
aoqi@0 | 28 | Object o8 = (Test<Class<Test>, Class<Test>>)null; //warn - inner Class (2) |
aoqi@0 | 29 | |
aoqi@0 | 30 | boolean b = null instanceof Test; //no warn - raw and instanceof |
aoqi@0 | 31 | } |