lambda: infer functional interface from enum constants (IDEA-97596)

This commit is contained in:
anna
2012-12-17 17:32:28 +01:00
parent f038ae950e
commit 44ab4d534a
3 changed files with 18 additions and 4 deletions
@@ -0,0 +1,10 @@
enum Bug {
INSTANCE1((Integer x, Integer y) -> x.byteValue()),
INSTANCE2((x, y) -> y. byteValue());
private Bug(Foo foo) {
}
private interface Foo {
byte bar(Integer x, Integer y);
}
}