mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
new inference: isAcceptable for lambda
This commit is contained in:
@@ -8,7 +8,7 @@ class Test {
|
||||
void foo(I<? extends String, ? extends List<? extends String>> fip) { }
|
||||
|
||||
void test() {
|
||||
foo<error descr="'foo(Test.I<? extends java.lang.String,? extends java.util.List<? extends java.lang.String>>)' in 'Test' cannot be applied to '(<lambda expression>)'">((ArrayList<? extends String> p) -> p.get(0))</error>;
|
||||
foo(<error descr="Cannot infer functional interface type">(ArrayList<? extends String> p) -> p.get(0)</error>);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,6 @@ class ReturnTypeCompatibility {
|
||||
call((String i)->{ return i;});
|
||||
call(i->{ return i;});
|
||||
call(i->"");
|
||||
call<error descr="'call(ReturnTypeCompatibility.I1<int>)' in 'ReturnTypeCompatibility' cannot be applied to '(<lambda expression>)'">((int i)->{ return i;})</error>;
|
||||
call(<error descr="Incompatible return type int in lambda expression">(int i)->{ return i;}</error>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user