mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
LocalsOrMyInstanceFieldsControlFlowPolicy: disallow qualified this
According to JLS Chapter 16 qualified "this" is not considered as reference to field in definite assignment analysis Fixes IDEA-193386 Good code is red: Variable may not have been initialized
This commit is contained in:
+15
@@ -1,5 +1,20 @@
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
interface IntFunction {
|
||||
int m(int i);
|
||||
}
|
||||
|
||||
private final int idx;
|
||||
|
||||
private final int idx2 = Test.this.idx + 1;
|
||||
|
||||
private final IntFunction multiply = i -> i * Test.this.idx;
|
||||
|
||||
public Test(int idx) {
|
||||
this.idx = idx;
|
||||
}
|
||||
}
|
||||
class C {
|
||||
interface Simplest {
|
||||
void m();
|
||||
|
||||
Reference in New Issue
Block a user