Skip to content

Rename of accessor method improperly renames property-style accesses #678

@eric-milles

Description

@eric-milles

Consider the following:

class A {
  private int foo
  int getFoo() { return this.foo }
  void setFoo(int foo) { this.foo = foo }
}

class B {
  def m(A a) {
    int i = a.@foo
    i = a.foo
    a.foo = i
  }
}

Rename of accessor getFoo improperly replaces i = a.foo with i = a.getNewName. Same goes for rename of setFoo (and probably isFoo if one existed).

Originally seen as part of #672

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions