mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
lambda -> method refs: array refs supported
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = String[]::new;
|
||||
}
|
||||
|
||||
interface Ar<T> {
|
||||
T[] _(int p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = String[]::clone;
|
||||
}
|
||||
|
||||
interface Ar<T> {
|
||||
Object _(T[] p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = p -> new <caret>String[p];
|
||||
}
|
||||
|
||||
interface Ar<T> {
|
||||
T[] _(int p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = p -> p.c<caret>lone();
|
||||
}
|
||||
|
||||
interface Ar<T> {
|
||||
Object _(T[] p);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user