qualify field access in initializer when shadowed by new declaration (IDEA-173780)

This commit is contained in:
Bas Leijdekkers
2019-02-06 16:09:30 +01:00
parent 0bad8022d5
commit 4e7a841173
3 changed files with 64 additions and 15 deletions
@@ -0,0 +1,12 @@
// "Insert '(String)x' declaration" "true"
class C {
Object x = new Object();
void x() {
if (x instanceof String) {
String x = (String) this.x;
<caret>
}
}
}
@@ -0,0 +1,11 @@
// "Insert '(String)x' declaration" "true"
class C {
Object x = new Object();
void x() {
if (x insta<caret>nceof String) {
}
}
}