pharo
pharo copied to clipboard
[RB] RBRemoveParameter preconditions has a side effect
In the following getNewSelector is actually doing a side effect so if we compute superclass preconditions and local one, they fail of course.
localPreconditions
| imps |
self getNewSelector.
imps := self model allImplementorsOf: oldSelector.
^ imps inject: (RBCondition definesSelector: oldSelector in: class)
into:
[:cond :each |
cond & (RBCondition
withBlock: [ (self hasReferencesToTemporaryIn: each) not ]
errorString: 'This argument is still referenced in at least one implementor!!')]