inference: skip constraints that depend on ignored constraints

when type of lambda parameter is calculated, the containing lambda doesn't end in the constraints set; if some other constraints depend on it's output variables, inside those constraints e.g. method calls may be cached based on incomplete inference results which would lead to blinking of highlighting
This commit is contained in:
Anna.Kozlova
2018-11-14 15:14:51 +01:00
parent ae72289117
commit c4393bfa0e
3 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
import java.util.function.Function;
class TestClass {
<H> void foo(Function<A, H> f, Function<H, String> toStr) {}
{
foo(o1 -> A.getB(o1), o2 -> o2.getId());
}
}
class A {
static B getB(A a) {
return null;
}
}
interface B {
String getId();
}