blob: f3bc8d4b8a6c0ce503ee98c81efd7bc8e0df692c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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"; }
}
}
|