Manuscript (Case [Issue]22250) SmallLint - RBCascadeNextPutAllsRule refactoring crash BlueInk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22250) SmallLint - RBCascadeNextPutAllsRule refactoring crash BlueInk

Pharo Issue Tracker
Manuscript Notification
avatar
CyrilFerlicot revised a previous entry on Case 22250: RBCascadeNextPutAllsRule refactoring crash BlueInk:
Bug in Project:  SmallLint: 1. Pharo Image  •  You are subscribed to this case
I have this method:


storeOn: aStream
aStream
nextPutAll: '(' , self class name;
nextPutAll: ' tint: '; print: (self tint);
nextPutAll: ' code: '; print: (self code);
nextPutAll: ')'.


The RBCascadeNextPutAllsRule propose an automatic refactoring but when I try to use it I get an error.

Instance of RBCascadeNode did not understand #selector

RBCascadeNode(Object)>>altDNU:
RBCascadeNode(Object)>>doesNotUnderstand: #selector
BIConfigurableFormatter>>isMultiLineMessage:
[ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] in [ :each |
self
indentAround: [ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] ] in [ self newLineBeforeFirstCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ].
aCascadeNode messages
do: [ :each |
self
indentAround: [ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] ]
separatedBy: [ codeStream nextPut: $;.
self newLineAfterCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ] ] ] in BIConfigurableFormatter>>visitCascadeNode: in Block: [ self formatCommentsFor: each....
BlockClosure>>ensure:
BIConfigurableFormatter>>indent:around:
BIConfigurableFormatter>>indentAround:
[ :each |
self
indentAround: [ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] ] in [ self newLineBeforeFirstCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ].
aCascadeNode messages
do: [ :each |
self
indentAround: [ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] ]
separatedBy: [ codeStream nextPut: $;.
self newLineAfterCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ] ] ] in BIConfigurableFormatter>>visitCascadeNode: in Block: [ :each | ...
OrderedCollection(SequenceableCollection)>>do:separatedBy:
[ self newLineBeforeFirstCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ].
aCascadeNode messages
do: [ :each |
self
indentAround: [ self formatCommentsFor: each.
self
formatSelectorAndArguments: each
firstSeparator: [ ]
restSeparator:
((self isMultiLineMessage: each)
ifTrue: [ [ self newLine ] ]
ifFalse: [ [ self space ] ]) ] ]
separatedBy: [ codeStream nextPut: $;.
self newLineAfterCascade
ifTrue: [ self newLine ]
ifFalse: [ self space ] ] ] in BIConfigurableFormatter>>visitCascadeNode: in Block: [ self newLineBeforeFirstCascade...
BlockClosure>>ensure:
BIConfigurableFormatter>>indent:around:
BIConfigurableFormatter>>indentAround:
BIConfigurableFormatter>>visitCascadeNode:
RBCascadeNode>>acceptVisitor:
BIConfigurableFormatter(RBProgramNodeVisitor)>>visitNode:
[ needsParenthesis
ifTrue: [ codeStream nextPutAll: self stringInsideParentheses ].
super visitNode: aNode.
(self formatCommentWithStatements
or: [ aNode isMethod or: [ aNode isSequence ] ])
ifFalse: [ self formatCommentsFor: aNode ].
needsParenthesis
ifTrue: [ codeStream nextPutAll: self stringInsideParentheses ] ] in BIConfigurableFormatter>>visitNode: in Block: [ needsParenthesis...
BIConfigurableFormatter>>bracketWith:around:
BIConfigurableFormatter>>visitNode:
BIConfigurableFormatter>>formatSequenceNodeStatementsFor:
BIConfigurableFormatter>>visitSequenceNode:
RBSequenceNode>>acceptVisitor:
BIConfigurableFormatter(RBProgramNodeVisitor)>>visitNode:
[ needsParenthesis
ifTrue: [ codeStream nextPutAll: self stringInsideParentheses ].
super visitNode: aNode.
(self formatCommentWithStatements
or: [ aNode isMethod or: [ aNode isSequence ] ])
ifFalse: [ self formatCommentsFor: aNode ].
needsParenthesis
ifTrue: [ codeStream nextPutAll: self stringInsideParentheses ] ] in BIConfigurableFormatter>>visitNode: in Block: [ needsParenthesis...
BIConfigurableFormatter>>bracketWith:around:
BIConfigurableFormatter>>visitNode:
[ self newLines: self newLinesAfterMethodPattern.
self formatMethodCommentFor: aMethodNode.
self formatPragmasFor: aMethodNode.
self visitNode: aMethodNode body ] in BIConfigurableFormatter>>formatMethodBodyFor: in Block: [ self newLines: self newLinesAfterMethodPattern....
BlockClosure>>ensure:
BIConfigurableFormatter>>indent:around:
BIConfigurableFormatter>>indentAround:
Priority Priority: 3 – Must Fix Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Pharo7.0

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker