Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-6654] Source compatibility regression with Zip2Iterator typealias #49203

Closed
DougGregor opened this issue Dec 21, 2017 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. regression standard library Area: Standard library umbrella swift 4.1

Comments

@DougGregor
Copy link
Member

Previous ID SR-6654
Radar rdar://problem/36256618
Original Reporter @DougGregor
Type Bug
Status Resolved
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, 4.1Regression
Assignee None
Priority Medium

md5: 11e06af173c2f633d12b2837fdc1918f

Issue Description:

This code is currently rejected on master:

struct Zip2Sequence<Sequence1 : Sequence, Sequence2 : Sequence> : Sequence {
public // @testable
init(_sequence1 sequence1: Sequence1, _sequence2 sequence2: Sequence2) {
(_sequence1, _sequence2) = (sequence1, sequence2)
}

public func makeIterator()
-> Zip2Iterator<Sequence1.Iterator, Sequence2.Iterator> {
return Swift.zip(_sequence1, _sequence2).makeIterator()
}

let _sequence1: Sequence1
let _sequence2: Sequence2
}

The regression was caused by #13489 which introduced an incorrect compatibility typealias for `Zip2Iterator`:

public typealias Zip2Iterator<T, U> = Zip2Sequence<T, U>.Iterator where T: Sequence, U: Sequence
@belkadan
Copy link
Contributor

belkadan commented Jan 2, 2018

@swift-ci create

@DougGregor
Copy link
Member Author

Per core team discussion, this is "acceptable breakage".

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. regression standard library Area: Standard library umbrella swift 4.1
Projects
None yet
Development

No branches or pull requests

3 participants