mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
lambda ->method ref: check if accessible (IDEA-132371)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
Function<Integer , Integer> s = this::next;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace lambda with method reference" "false"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
Function<Integer , Integer> s = (i) -> super.ne<caret>xt(i);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
Function<Integer , Integer> s = (i) -> ne<caret>xt(i);
|
||||
}
|
||||
Reference in New Issue
Block a user