anonymous -> lambda: allow field shadowing when suggesting new local names (IDEA-157288)

This commit is contained in:
Anna Kozlova
2016-07-08 10:46:34 +02:00
parent 6ee2ce046e
commit 4e813690f7
3 changed files with 29 additions and 1 deletions
@@ -0,0 +1,10 @@
// "Replace with lambda" "true"
class Test {
Integer s;
private void m() {
Runnable r = () -> {
System.out.println(s);
Integer s = Test.this.s;
};
}
}
@@ -0,0 +1,13 @@
// "Replace with lambda" "true"
class Test {
Integer s;
private void m() {
Runnable r = new Runna<caret>ble() {
@Override
public void run() {
System.out.println(s);
Integer s = Test.this.s;
}
};
}
}