lambda ->method ref: check if accessible (IDEA-132371)

This commit is contained in:
Anna Kozlova
2014-11-10 20:32:21 +01:00
parent 2cbd7d0d52
commit 09f8895b2b
4 changed files with 42 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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);
}