method refs: ensure raw substitutor is not used for second search case to build return type constraints (IDEA-165239)

This commit is contained in:
Anna.Kozlova
2016-12-14 11:31:36 +01:00
parent cb0636749a
commit 575a0740a9
4 changed files with 41 additions and 13 deletions
@@ -0,0 +1,19 @@
class Test {
public interface Copier<TypeT> {
TypeT m(TypeT value);
}
public static class A<PhantomT> {
public <OtherT extends A<?>> OtherT copy() {
return null;
}
}
static <TypeT> void foo(TypeT value, Copier<TypeT> copier) {}
public static void foo() {
A<?> val = new A<>();
foo(val, A::copy);
}
}