[squeak-dev] Stream nextPutAll: with an OrderedCollection go boom

tim Rowledge tim at rowledge.org
Tue Mar 30 18:41:07 UTC 2021


I spotted a previous mention of this in the old maillist archives but it is still a current failure - 

	(OrderedCollection
		streamContents:
			[:strm |
				strm
					nextPutAll: (OrderedCollection with: 1 ) ])

Boom!

It's fine if we add asArray

I'm suspicious of WriteStream>>#nextPutAll: making the assumption that SequenceableCollection>>#replaceFrom:to:with:startingAt: is always ok. Clearly not for OrderedCollection...

Looks to me that we need to make OrderedCollection not pass the check for the 'fast path'? How about changing the #isBits test for a more capability oriented #canAcceptFastPathNextPut ?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
A bug in the code is worth two in the documentation.




More information about the Squeak-dev mailing list