Maurizio Cimadamore da6bbaf42b 8020843: javac crashes on accessibility check with method reference with typevar receiver
Method reference overload check doesn't walk through type-variable receivers

Reviewed-by: jjg
2013-07-25 14:51:40 +01:00

17 lines
365 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8020843
* @summary javac crashes on accessibility check with method reference with typevar receiver
* @compile/fail/ref=T8020843a.out -XDrawDiagnostics T8020843a.java
*/
class T8020843a {
interface Function<X, Y> {
Y m(X x);
}
<T> void test(T t) {
Function<T, Object> ss = T::clone;
}
}