pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[RB] RBRemoveParameter preconditions has a side effect

Open Ducasse opened this issue 2 years ago • 0 comments

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!!')]

Ducasse avatar Jul 08 '23 15:07 Ducasse