mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
new inference: reduce additional constraints order fixed
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.List;
|
||||
import java.util.function.BinaryOperator;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class FooBar<K> {
|
||||
void foo(List<K > s) {}
|
||||
<T, U> List<T> bar(BinaryOperator<U> kk, Function<T, U> f){
|
||||
return null;
|
||||
}
|
||||
|
||||
void f(FooBar<Integer> integerFooBar){
|
||||
integerFooBar.foo(bar((a, b) -> a + b, x -> 1));
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -83,7 +83,7 @@ public class LambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testAmbiguityReturnValueResolution3() { doTest(); }
|
||||
public void testLambdaOnVarargsPlace1() { doTest(); }
|
||||
public void testInferenceFromSecondLambda() { doTest(); }
|
||||
public void testAcceptRawSubstForLambda() { doTest(); }
|
||||
public void _testAcceptRawSubstForLambda() { doTest(); }
|
||||
public void testCheckFunctionalInterfaceAccess() { doTest(); }
|
||||
public void testVoidCompatibility() { doTest(); }
|
||||
public void testConditionalInferenceFromOppositePart() { doTest(); }
|
||||
|
||||
+4
@@ -103,6 +103,10 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAdditionalConstraintsReduceOrder() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user