Mon, 24 Nov 2014 12:49:30 -0500
8029012: parameter_index for type annotation not updated after outer.this added
Summary: Fix javac's handling of type annotations when synthetic parameters are added
Reviewed-by: jjg, mcimadamore
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6231847
4 * @summary Crash in com.sun.tools.javac.comp.Attr.visitNewClass:1352
5 * @author Peter von der Ah\u00e9
6 * @compile/fail -XDdev T6231847.java
7 * @compile/fail/ref=T6231847.out -XDdev -XDrawDiagnostics T6231847.java
8 */
10 class T6231847 {
11 interface T6231847I {}
12 static class T6231847C {}
14 T6231847 t;
15 Object o = new <Object> T6231847I() {};
16 Object p = new T6231847I(o) {};
17 Object q = t.new T6231847I() {};
18 Object r = t.new <Object> T6231847I(o) {};
19 Object s = t.new T6231847C() {};
20 }