class: ImmutableArray
authorStefan Vogel <sv@exept.de>
Thu, 20 Aug 2015 17:23:46 +0200
changeset 18702 9e60f3215c37
parent 18701 713eeb421910
child 18703 a2887ae5eca8
class: ImmutableArray added: #becomeSameAs:
ImmutableArray.st
--- a/ImmutableArray.st	Thu Aug 20 09:43:26 2015 +0200
+++ b/ImmutableArray.st	Thu Aug 20 17:23:46 2015 +0200
@@ -201,6 +201,14 @@
 
     self noModificationError.
     ^ super becomeNil
+!
+
+becomeSameAs:anotherObject
+    "trigger an error if I should become something else
+     (this would be an even more tricky manipulation)"
+
+    self noModificationError.
+    ^ super becomeSameAs:anotherObject
 ! !
 
 !ImmutableArray class methodsFor:'documentation'!