mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-05 21:00:59 +07:00
anonymous -> lambda: do not collapse to lambda functional interfaces with generics methods, accepted by method refs though
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Replace with method reference" "true"
|
||||
class Main {
|
||||
|
||||
interface A {
|
||||
<K> void foo();
|
||||
}
|
||||
|
||||
static void mm(){}
|
||||
|
||||
{
|
||||
A a = Main::mm;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user