On 22 Nov 2015, at 16:20, stepharo <stepharo@free.fr> wrote:
With the following (broken) definition
printOn: aStream super printOn: aStream aStream nextPutAll: '(', faces printString , â)'
So, itâs broken because of the missing â.â. That means the message sent is #printOn:nextPutAll:.
I got this strange rule:
Rewrite super messages to self messages when both refer to same method
Perfectly reasonable. The rule says that in this context it doesnât effectively make a difference wether you send #printOn:nextPutAll: to super *or* to self. *But* from an aesthetic point of view (at least) self is better than super.
I do not get it and it looks really suspicious to me. Any suggestions?
I guess you were expecting âSends different superâ (at least I would). I think those two rules are complementary. But âSends different superâ would probably be enough to cover both cases. Not 100% sure though. Cheers, Max
Stef