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-4951] Sequence.Element introduced breaking changes to SWXMLHash #47528

Closed
norio-nomura opened this issue May 20, 2017 · 5 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. source compatibility standard library Area: Standard library umbrella

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-4951
Radar rdar://problem/32328287
Original Reporter @norio-nomura
Type Bug
Status Closed
Resolution Won't Do
Environment

swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-17-a

Additional Detail from JIRA
Votes 1
Component/s Standard Library
Labels Bug, SourceCompatibility
Assignee @airspeedswift
Priority Medium

md5: f4b3ca86826fbeb4917e4a8f6d34a1b3

Issue Description:

This changes introduced breaking changes to SWXMLHash

failed log

SWXMLHash.XMLIndexer:72:22: error: invalid redeclaration of 'Element'
    public typealias Element = (SWXMLHash.XMLIndexer)
                     ^
/home/travis/build/jpsim/SourceKitten/.build/checkouts/SWXMLHash.git-4935070468589473534/Source/SWXMLHash.swift:457:10: note: 'Element' previously declared here
    case Element(XMLElement)

SWXMLHash.XMLIndexer is defined as:

public enum XMLIndexer: Sequence {
    case Element(XMLElement)
    case List([XMLElement])
    case Stream(IndexOps)
    case XMLError(IndexingError)
…

This error can not be avoided even by using -swift-version 3.

@moiseev
Copy link
Mannequin

moiseev mannequin commented May 22, 2017

@swift-ci create

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 5, 2017

Comment by Craig Perkel (JIRA)

I have the same issue on xCode 9, the code used to work perfectly in xCode 8.3

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 5, 2017

Comment by David Mohundro (JIRA)

Just a note, but SWXMLHash version 4 fixed this issue.

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 6, 2017

Comment by Craig Perkel (JIRA)

thanks a lot David!

@airspeedswift
Copy link
Member

Closing as NTBF. This is one of a small number of issues that the core team felt it was impractical to make backward-compatible in 3.2, especially given the intention was always to have Element be a type at the Sequence level once the type system could express it (and already was in some concrete implementations e.g. Array).

@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. source compatibility standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants