mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
java inference: stop when argument has no associated formal parameter
GitOrigin-RevId: cbc4e435f6e03bd06eac4dcf21196bdd61dc6c3d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d93efc10e8
commit
21e434894f
@@ -0,0 +1,17 @@
|
||||
import java.util.function.UnaryOperator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Main {
|
||||
static class A {
|
||||
A next(){return null;}
|
||||
int x;
|
||||
}
|
||||
|
||||
static boolean isGood(A a) {
|
||||
return true;
|
||||
}
|
||||
|
||||
{
|
||||
Stream.iterate(new A(), (UnaryOperator<A>) <error descr="Bad return type in method reference: cannot convert boolean to Main.A">Main::isGood</error>, a -> a.<error descr="Cannot resolve method 'next()'">next</error>()).filter(a -> a.x < 3).forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user