jdk-24/langtools/test/tools/javac/lambda/MethodReference55.java
Maurizio Cimadamore dbe88a2ef1 8072445: tools/javac/lambda/MethodReference55.java fails across platforms
Remove copyright from test header

Reviewed-by: jlahoda
2015-02-05 18:51:09 +00:00

23 lines
461 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8004101 8072445
* @summary Add checks for method reference well-formedness
* @compile/fail/ref=MethodReference55.out -XDrawDiagnostics MethodReference55.java
*/
class MethodReference55<X> {
interface V {
void m(Object o);
}
V v = new MethodReference55<String>()::m;
void test() {
g(new MethodReference55<String>()::m);
}
void g(V v) { }
static void m(Object o) { };
}