mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fc0b6309b8
commit
5355846fe0
@@ -0,0 +1,27 @@
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
||||
class MyTest {
|
||||
{
|
||||
Function<B, Try<A>> aNew = Try::new;
|
||||
Try<B> bTry = new Try<>(new B());
|
||||
Try<A> aTry = bTry.flatMap(Try::new);
|
||||
}
|
||||
|
||||
private static class A { }
|
||||
|
||||
private static class B extends A { }
|
||||
|
||||
private static class Try<T> {
|
||||
public Try(T t) {
|
||||
}
|
||||
public Try(Exception e) {
|
||||
}
|
||||
|
||||
public <U> Try<U> flatMap(Function<? super T, Try<U>> mapper) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user