mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 14:50:53 +07:00
16 lines
410 B
Java
16 lines
410 B
Java
class ThreadExample {
|
|
interface Function<T, R> {
|
|
|
|
R apply(T t);
|
|
}
|
|
{
|
|
A a = new A();
|
|
<error descr="Incompatible types. Found: '<method reference>', required: 'ThreadExample.Function<? super ThreadExample.A,? extends java.lang.String>'">Function<? super A,? extends String> foo = a::foo;</error>
|
|
}
|
|
|
|
static class A {
|
|
public String foo() { return "a"; }
|
|
}
|
|
}
|
|
|