mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
prepend(from:) looped calling uncheckedPrepend, which each time placed the new batch at index 0 of the deque. Later batches ended up in front of earlier ones, producing items in the wrong order. Fix: use uncheckedInsert(addingCount:at:added) so each new batch is inserted immediately after the items already prepended in earlier passes. Promote the overload from internal to package so ContainersPreview can reach it. Adds a regression test covering single- and multi-batch producers prepending into empty and non-empty deques. Fixes #763. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>