Skip to content

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

@eric-milles

Description

@eric-milles

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions