mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
lambda: tests
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
interface I<A, B> {
|
||||
B foo(A a);
|
||||
}
|
||||
class NoInferenceResult {
|
||||
|
||||
<A, B> I<A, B> m(I<A, B> f) { return null; }
|
||||
<T> void m1(T t) { }
|
||||
|
||||
void test() {
|
||||
m<error descr="'m(I<java.lang.Object,java.lang.Object>)' in 'NoInferenceResult' cannot be applied to '(<lambda expression>)'">((String s1) -> (String s2) -> s1 + s2)</error>;
|
||||
|
||||
m((String s1) -> s1.length());
|
||||
m((String s1) -> s1);
|
||||
|
||||
m1<error descr="'m1(java.lang.Object)' in 'NoInferenceResult' cannot be applied to '(<lambda expression>)'">(() -> { })</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user