pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[Refactoring-UI] Error when removing used method

Open JanBliznicenko opened this issue 5 months ago • 0 comments

When we try to remove a method that might be in use (sent), the reactoring offers to do it or show the violators. Instead of showing them, it ends up with an error.

Steps to reproduce:

  1. Create a method with code abc self def (abc is the name of the method) in any class
  2. Create a method with code def in the same class
  3. Right click the 'def' method
  4. (R) Remove
  5. Pick "Don't remove, but show me those senders" or "Remove, then browse those senders", and Accept

=> #numberOfElements was sent to nil, in StMessageBrowser

The error happens in StMessageBrowser, but the same browser is used in multiple other places and those do not end up with this error, so I believe it might be an issue with ReRemoveMethodDrive, but I am not sure.

Issue is present in the released Pharo 13 and current build of Pharo 14.

JanBliznicenko avatar May 27 '25 15:05 JanBliznicenko