mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
rename: qualify to avoid undiagnosed shadowing ( IDEA-20634 )
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
class A {
|
||||
class <caret>B {
|
||||
int x = 42;
|
||||
}
|
||||
}
|
||||
|
||||
public class D {
|
||||
static class C extends A {
|
||||
int x = 23;
|
||||
|
||||
int m() {
|
||||
return C.this.x;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new C().m());
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
class A {
|
||||
class C {
|
||||
int x = 42;
|
||||
}
|
||||
}
|
||||
|
||||
public class D {
|
||||
static class C extends A {
|
||||
int x = 23;
|
||||
|
||||
int m() {
|
||||
return D.C.this.x;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new C().m());
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
class A {
|
||||
static class <caret>B {
|
||||
static int x = 42;
|
||||
}
|
||||
}
|
||||
|
||||
public class D {
|
||||
static class C extends A {
|
||||
static int x = 23;
|
||||
|
||||
static int m() {
|
||||
return C.x;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(C.m());
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
class A {
|
||||
static class C {
|
||||
static int x = 42;
|
||||
}
|
||||
}
|
||||
|
||||
public class D {
|
||||
static class C extends A {
|
||||
static int x = 23;
|
||||
|
||||
static int m() {
|
||||
return D.C.x;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(D.C.m());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user