Skip to content

[SR-4240] drop(while:) after prefix() on pure Sequence looses the prefix #46823

@palimondo

Description

@palimondo
mannequin
Previous ID SR-4240
Radar None
Original Reporter @palimondo
Type Bug
Status Closed
Resolution Done
Environment

Swift 3.1beta

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, 3.1Regression
Assignee @CodaFi
Priority Medium

md5: cee58ba90aa08a68ae18b33517c07038

Issue Description:

Looking at the source code, I believe the #4346 introduced a bug in stdlib/public/core/Sequence.swift, where the calling drop(while: ) after prefix() on a pure Sequence (Collections override this implementation) would loose the prefix, because in the internal drop(while: ) override grabs the underlying base iterator from _PrefixSequence and just wraps it in the _DropWhileSequence.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrella

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions