anonymous -> lambda: do not collapse to lambda functional interfaces with generics methods, accepted by method refs though

This commit is contained in:
Anna Kozlova
2014-05-23 16:11:10 +04:00
parent bfc443c807
commit d2c04b864f
4 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
// "Replace with method reference" "true"
class Main {
interface A {
<K> void foo();
}
static void mm(){}
{
A a = Main::mm;
}
}

View File

@@ -0,0 +1,18 @@
// "Replace with method reference" "true"
class Main {
interface A {
<K> void foo();
}
static void mm(){}
{
A a = new A<caret>() {
@Override
public <K> void foo() {
mm();
}
};
}
}