Files
openide/java/java-tests/testData/refactoring/introduceConstant/StaticFieldInAnonymousJava8_after.java
Bas Leijdekkers 0dbc31a8b6 Java: allow to introduce a constant as a field of an inner, local or anonymous class (IDEA-341923)
for Introduce Constant refactoring. Also fixes IDEABKL-3269 when introducing a compile-time constant from an expression.

GitOrigin-RevId: 169e7ee8e14306a265948537b62746d9a26c0298
2023-12-28 17:40:25 +00:00

12 lines
197 B
Java

class X {
public static final Object xxx = new Object();
void x() {
new Object() {
void x() {
System.out.println(xxx);
}
};
}
}