pharo
pharo copied to clipboard
[RB] RBMoveTemporaryVariableDefinitionTransformation should define applicatbilityPreconditions
RBMoveTemporaryVariableDefinitionTransformation >> buildTransformations
"ifnil... tight blocks should not be returned as errors"
blockNodes ifNil: [ self checkMethodForBlocks ].
^ (OrderedCollection
withAll: ((blockNodes
sorted: [ :a :b | a start > b start ])
collect: [ :blockNode |
RBAddTemporaryVariableTransformation
variable: variableName
inInterval: blockNode body sourceInterval
inMethod: selector
inClass: class ]))
add: (RBRemoveTemporaryVariableTransformation
variable: variableName
inMethod: selector
inClass: class);
yourself
and it should not include it in the buildTransformation