pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Push Down Class Variable Refactoring simply removes it

Open refactoringdr opened this issue 2 years ago • 0 comments

Bug description Push Down Class Variable Refactoring simply removes it. It does not correctly identify subclasses that reference the class variable

To Reproduce Steps to reproduce the behavior:

  1. Select a superclass with a Class variable that is referenced in subclasses (but not the superclass).
  2. In the class definition right click on the class variable and select "Push Down"3.
  3. The resulting refactoring will simply remove the class variable leaving undeclared bindings in the subclasses

Expected behavior The class variable should be pushed into the referring subclasses definitions.

Version information:

  • Pharo Version 10

Expected development cost

To fix it, change RBAbstractClass>>bindingOf: to:

bindingOf: aString
	^ self realClass bindingOf: aString

refactoringdr avatar Jul 29 '22 13:07 refactoringdr