ensure correct expression is checked during read before write variable check (IDEA-135937)

This commit is contained in:
Anna Kozlova
2015-02-20 21:37:28 +01:00
parent e4e12a068a
commit 9fc640a8f0
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,17 @@
import java.util.Comparator;
class Test {
private final int x;
public Test(int x) {
this.x = x;
}
public static final Comparator<Test> comparator = (o1, o2) -> {
if (o1.x == o2.x) {
}
<error descr="'Test.this' cannot be referenced from a static context">this</error>.x != o2.x;
return 0;
};
}