Inside of this code:
Perform rename refactor on val. And after committing the refactoring change, the processor comes up with a warning:
This is happening because we are visiting the closure expression twice when looking for references. The first time as part of the field declaration and the second time as part of the default constructor (groovy stuffs field initializers into the default constructor). So, we need to be more careful about visiting here.
Just to note, if the user clicks Continue the refactoring completes as expected with no errors.