Refactor: Clean up dead code and align copy with standard Pharo lifecycle#10
Conversation
|
Thanks for your contribution. Can you add a couple of tests checking that the state is not shared? |
|
Thank you for the review, @Ducasse! I've just pushed a new commit. Let me know if you need any further adjustments! |
|
Tx for this good test! |
|
@Ducasse |
| ifFalse: [ assoc value ]) ] ] | ||
| super postCopy. | ||
| self keysAndValuesDo: [ :key :value | | ||
| (value isKindOf: self class) |
There was a problem hiding this comment.
why do we need to type check in here? assoc value isKindOf: self class is type checking
There was a problem hiding this comment.
You are right, i carried it over from the old dead postCopy code to ensure I didn't unintentionally break any legacy behavior
ig we can fix that using Polymorphism by Just send #copy to everything: self keysAndValuesDo: [ :key :value | self at: key put: value copy ]
Pull Request Test Coverage Report for Build 23247261395Details
💛 - Coveralls |

Fixes #9