Skip to content

Rename of setter causes invalid rename to bean-style access #1013

@eric-milles

Description

@eric-milles

Consider the following:

class C {
  String foo
  void setFoo(String value) {
    this.foo = value
  }
}
@groovy.transform.CompileStatic
class D {
  void meth(C c) {
    c.foo = ''
  }
}

Renaming "setFoo" to "setX" incorrectly renames bean-style reference "c.foo" to "c.setX". Removing the @CompileStatic and renaming properly changes the expression to "c.x = ''".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions