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

Rename of class with constructor using default arguments causes error

Open eric-milles opened this issue 6 years ago • 1 comments

Consider the following:

class DefaultParams {
  String value

  DefaultParams(String value = '') {
    this.value = value
  }
  /*@Generated
  DefaultParams() {
    this((String)'')
  }*/
}

Rename "DefaultParams" to anything else and there is a refactoring error due to overlapping edits for generated constructors. The generated constructor(s) for default arguments share the name range of the original for searching purposes.

eric-milles avatar May 31 '19 16:05 eric-milles

This may also be an issue for @NamedVariant methods.

eric-milles avatar Jun 03 '19 16:06 eric-milles