mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-15 22:07:20 +07:00
java inference: ignore method reference constraints when starting from them
EA-209460 - IAE: ObjectUtils.$$$reportNull$$$ GitOrigin-RevId: 8476b832fcc1c85c10aed6ea56f65645bfd02b03
This commit is contained in:
committed by
intellij-monorepo-bot
parent
99cb317c9b
commit
c20dfc0165
+29
@@ -0,0 +1,29 @@
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class DemoApplicationTests {
|
||||
|
||||
void test2() {
|
||||
var a = Stream.of("")
|
||||
.map(s -> s.substring(1))
|
||||
.map(s -> s.length())
|
||||
.map(l1 -> String.valueOf(l1)).collect(Collectors.toList());
|
||||
|
||||
Stream.of("")
|
||||
.map(l -> a.get(l.length()))
|
||||
.map(s -> new DemoApplicationTests()).findAny()
|
||||
.map(d -> d.foo(this::<error descr="Cannot resolve method 'bar'">ba<caret>r</error>));
|
||||
}
|
||||
|
||||
<T> void foo(Consumer<T> c) {}
|
||||
|
||||
<T, R> void foo(Function<T, R> c) {}
|
||||
|
||||
void bar(long j) {}
|
||||
|
||||
void bar(int i) {}
|
||||
}
|
||||
Reference in New Issue
Block a user