changeClassTo: can be used to change the class of an object, between indexable and non-indexable classes (that is, between a class that allows or does not allow unnamed instance variables, to the converse), and to a class that has more or fewer named instance variables.
The behavior for on some of these changes was not correct with regards to overflow instance variable values, particularly between indexed and named instance variable slots.
When converting from an instance with indexable instance variables to a class that was not indexable, if there are more named instance variables in the target class, these slots were filled with nils, and the indexed contents were left in place. The resulting object was larger by that difference.
See also bug 46475 on changeClassTo: behavior, in which some kinds of collections may be corrupted/data lost.
Last updated: 4/3/17