lambda: accept raw functional interfaces when there are no params

This commit is contained in:
anna
2012-12-18 13:07:31 +01:00
parent 55ce55a20e
commit d9fb83d631
3 changed files with 24 additions and 3 deletions
@@ -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());
}
}