isApplicable for raw qualifiers: it's enough to erasure left type, then right type should be able to assign there, so method reference type/lambda type won't be lost during erasure (IDEA-144547)

This commit is contained in:
Anna Kozlova
2015-09-04 13:45:00 +03:00
parent b1e63ba47b
commit 962225c53e
3 changed files with 32 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
import java.util.Map;
class Test<T, K> {
interface IA {
void a();
}
interface IB<T> {
void b(T t);
}
void onEntry(IA i){
System.out.println(i);
}
void onEntry(IB<Map<T, K>> i){
System.out.println(i);
}
void foo(Test t) {
t.onEntry(this::fooBar);
}
private void fooBar() {}
}