method references: don't infer Object when no constraint exist for 'raw' reference (IDEA-171922)

This commit is contained in:
Anna.Kozlova
2017-04-26 13:50:38 +02:00
parent e2ceb575a2
commit c4d213ba26
3 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import java.util.List;
import java.util.function.Function;
class Foo<T extends Comparable<T>> {
public Foo(final Foo<T> tuple) { }
{
List<Foo<T>> l = bar(Foo::new);
}
public<U> List<U> bar(Function<Foo<T>, U> mapper) {
return null;
}
}