groovy-eclipse icon indicating copy to clipboard operation
groovy-eclipse copied to clipboard

Rename of static accessor method fails to rename property-style access w/o object expression

Open eric-milles opened this issue 7 years ago • 0 comments

Consider the following:

package a
class B {
  static def getX() {}
}
import static a.B.getX
x

x is a static method call expression for getX. Renaming getX in B properly renames the static import reference, but fails to rename the static method call expression.

Note: This happens because the static import is renamed in the first phase of the rename refactoring. Then the rename participant is called to find property-style accesses. At that time, type inferencing cannot establish the connection between the expression x and the static import, which now refers to the new name for the accessor.

See #678 for more details

eric-milles avatar Aug 18 '18 01:08 eric-milles