[Cuis-dev] [DEFECT] #copyFrom:count: for OrderedCollections
Juan Vuletich
juan at cuis.st
Tue Feb 6 06:56:57 PST 2024
On 2/1/2024 5:43 PM, Gerald Klix via Cuis-dev wrote:
> Hi all, Hi Juan,
>
> I found a glitch in #copyFrom:count.
> IHMO both expression should work:
>
> --- snip ---
> 1 to: 10 :: copyFrom: 1 count: 3.
>
> 1 to: 10 :: asOrderedCollection copyFrom: 1 count: 3.
> --- snap ---
>
> The later creates an empty OrderedCollection and fails.
>
> I attached a change set, that replaces sends of #new: with
> sends of #sizeOf: in various methods,
> although some of these methods are special cased
> in OrderedCollection.
>
>
> Best Regards,
>
> Gerald
Thanks Gerald. I integrated this a few days ago. Still, I think that
| n |
n := whatever number.
(AnyCollectionClass new: n) size = n
should _always_ evaluate to true (or fail if it doesn't make sense). So
I pushed some very substantial changes that kept me quite busy for
several days. Now `OrderedCollection new: 10` will fail. Same for Set,
Dictionary, Bag and a few others. I've adjusted many packages accordingly.
Cheers,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list