show error if uninitialized field is referenced from lambda inside inner/anonymous class in another field initializer; disable anonymous -> lambda for such places

This commit is contained in:
Anna.Kozlova
2016-03-21 21:11:36 +01:00
parent fb50cf14b5
commit 6fc9953a82
4 changed files with 48 additions and 1 deletions
@@ -0,0 +1,19 @@
// "Replace with lambda" "false"
class Test {
private final int myId;
private final Runnable myModels = new Runnable() {
private Comparable<String> myMapping = new Compa<caret>rable<String>() {
@Override
public String apply(final String s) {
return myId;
}
};
public void run() {}
};
public Test(final int i) {
myId = i;
}
}