Bug-fix for Cloneable #derive without mixins.
[cslatevm.git] / src / core / array.slate
blob36793c3d8d781938e8fe84316af6992edd069967
2 Array traitsWindow _delegates := {Mapping traits. Collection traits. Sequence traits. Array traits}.
4 "Ensures that the primitive Array type has the behaviors and features of a
5 Sequence."
7 a@(Array traits) new &capacity: n
8 "Array capacity is its size, and newSize: is a primitive."
9 [a newSize: (n ifNil: [0])].
11 a@(Array traits) new* [| *rest | rest].
13 a@(Array traits) copy [a clone].
15 a@(Array traits) arrayType [a].
17 _@(Array traits) elementType [Root].
19 a@(Array traits) hasIndexedSlots [a ~== Array traits].
21 _@(Root traits) hasIndexedSlots [False].