[squeak-dev] asSortedCollection always copies?

Frank Shearar frank.shearar at angband.za.org
Fri May 6 21:06:42 UTC 2011


On 2011/05/06 21:50, Ralph Boland wrote:
> I am using Squeak 10.2 and haven't checked 4.2 so apologies if this doesn't
> apply to 4.2.  I checked 4.1 though and the problem is in 4.1 also.
>
> Method asSet returns self for sets and method asArray returns self for arrays
> but asSortedCollection returns a copy of the sortedCollection for
> SortedCollections.
>
> This inconsistency constitutes a bug to my mind.
> Unless someone disagrees I will generate a bug report.
> Pointing out that the this is fixed in 4.2 constitutes disagreement.
> (If you fix the bug for 4.3 and then post that it is fixed saves me
> generating the bug report; of course you shouldn't do this).

Mm, SortedCollection behaves the same as OrderedCollection, in returning 
a copy (via #newFrom:), for what it's worth.

frank




More information about the Squeak-dev mailing list