mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
lambda: accept raw functional interfaces when there are no params
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
public class FooBar {
|
||||
private static final class Bar2 {
|
||||
private Bar2() {
|
||||
}
|
||||
}
|
||||
|
||||
private interface I<T> {
|
||||
T create();
|
||||
}
|
||||
|
||||
static void foo(I intf) {}
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
foo(() -> new Bar2());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user