Files
openide/java/java-tests/testData/codeInsight/highlight/remove_new/afterCallStaticFieldOfParent.java
Nikita Eshkeev 35bdacb51f [java-highlight] IDEA-253796 Trying to call static method on a new-expression should offer a quickfix to remove new
Fix notes from the review, it includes:

- moving the check if the new expression can be a call to static field/method to HighlightUtil
- checking the base class when looking for a static member

GitOrigin-RevId: 0a914f8cc76a13ae4249f9f6b752dcbccae8c940
2021-04-06 22:27:37 +00:00

15 lines
173 B
Java

// "Remove 'new'" "true"
class A {
public static A field = new A();
}
class B extends A {
{
/*
* hello
* world
*/
A a = B.field;
}
}