anonym -> lambda: do not suggest when forward references are detected (IDEA-120699)

This commit is contained in:
Anna Kozlova
2014-02-24 21:48:59 +01:00
parent b716f4763b
commit 44dde647bb
4 changed files with 33 additions and 4 deletions
@@ -0,0 +1,7 @@
// "Replace with lambda" "true"
class HelloLambda {
private final Runnable r = () -> {
System.out.println(x);
};
private static int x = 0;
}
@@ -0,0 +1,10 @@
// "Replace with lambda" "false"
class HelloLambda {
private final Runnable r = new Run<caret>nable() {
@Override
public void run() {
System.out.println(x);
}
};
private int x = 0;
}
@@ -0,0 +1,10 @@
// "Replace with lambda" "true"
class HelloLambda {
private final Runnable r = new Run<caret>nable() {
@Override
public void run() {
System.out.println(x);
}
};
private static int x = 0;
}