mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
lambda: accept Object when return type is void
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import java.lang.String;
|
||||
import java.util.*;
|
||||
class Test4 {
|
||||
interface I<K> {
|
||||
@@ -33,4 +34,16 @@ class Test6 {
|
||||
bar(<error descr="Incompatible return type <null> in lambda expression">() -> null</error>);
|
||||
bar(() -> {});
|
||||
}
|
||||
}
|
||||
|
||||
class Test7 {
|
||||
interface I<K> {
|
||||
void foo(String s);
|
||||
}
|
||||
|
||||
static <T> void bar(I<T> i){}
|
||||
|
||||
{
|
||||
bar(x -> {});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user