Thu, 25 Jul 2013 14:51:40 +0100
8020843: javac crashes on accessibility check with method reference with typevar receiver
Summary: method reference overload check doesn't walk through type-variable receivers
Reviewed-by: jjg
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 6231847 |
duke@1 | 4 | * @summary Crash in com.sun.tools.javac.comp.Attr.visitNewClass:1352 |
duke@1 | 5 | * @author Peter von der Ah\u00e9 |
duke@1 | 6 | * @compile/fail -XDdev T6231847.java |
jjg@611 | 7 | * @compile/fail/ref=T6231847.out -XDdev -XDrawDiagnostics T6231847.java |
duke@1 | 8 | */ |
duke@1 | 9 | |
duke@1 | 10 | class T6231847 { |
duke@1 | 11 | interface T6231847I {} |
duke@1 | 12 | static class T6231847C {} |
duke@1 | 13 | |
duke@1 | 14 | T6231847 t; |
duke@1 | 15 | Object o = new <Object> T6231847I() {}; |
duke@1 | 16 | Object p = new T6231847I(o) {}; |
duke@1 | 17 | Object q = t.new T6231847I() {}; |
duke@1 | 18 | Object r = t.new <Object> T6231847I(o) {}; |
duke@1 | 19 | Object s = t.new T6231847C() {}; |
duke@1 | 20 | } |