mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
IDEA-162574 False positive 'Lambda can be replaced with method reference'
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
public void test(Object obj) {
|
||||
Function<Object, int[]> fn = int[].class::cast;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
public void test(Object obj) {
|
||||
Function<Object, int[]> fn = s -> (int[])<caret>s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace lambda with method reference" "false"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
public void <T> test(Object obj) {
|
||||
Function<Object, T> fn = s -> (T)<caret>s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace lambda with method reference" "false"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
public void <T> test(Object obj) {
|
||||
Function<Object, T[]> fn = s -> (T[])<caret>s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user