Skip to content

Delete redundant constraints in NSData.swift causing warnings #978

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

Merged
merged 1 commit into from
May 8, 2017

Conversation

e78l
Copy link
Contributor

@e78l e78l commented May 8, 2017

Delete 2 constraints causing warnings in NSData.swift introduced from swiftlang/swift@ddc2775

Compiler warnings suggest redundant last 2 constraints are implied by Collection:

Foundation/NSData.swift:590:253: warning: redundant same-type constraint 'T.Iterator.Element' == 'T.SubSequence.Iterator.Element'
    private static func searchSubSequence<T : Collection, T2 : Sequence>(_ subSequence : T2, inSequence seq: T,anchored : Bool) -> T.Index? where T.Iterator.Element : Equatable, T.Iterator.Element == T2.Iterator.Element, T.SubSequence.Iterator.Element == T.Iterator.Element, T.Indices.Iterator.Element == T.Index {
                                                                                                                                                                                                                                                            ^
Foundation/NSData.swift:590:47: note: previous same-type constraint 'T._Element' == 'T.Iterator.Element' implied here
    private static func searchSubSequence<T : Collection, T2 : Sequence>(_ subSequence : T2, inSequence seq: T,anchored : Bool) -> T.Index? where T.Iterator.Element : Equatable, T.Iterator.Element == T2.Iterator.Element, T.SubSequence.Iterator.Element == T.Iterator.Element, T.Indices.Iterator.Element == T.Index {
                                              ^
Foundation/NSData.swift:590:303: warning: redundant same-type constraint 'T.Index' == 'T.Indices.Iterator.Element'
    private static func searchSubSequence<T : Collection, T2 : Sequence>(_ subSequence : T2, inSequence seq: T,anchored : Bool) -> T.Index? where T.Iterator.Element : Equatable, T.Iterator.Element == T2.Iterator.Element, T.SubSequence.Iterator.Element == T.Iterator.Element, T.Indices.Iterator.Element == T.Index {
                                                                                                                                                                                                                                                                                                              ^
Foundation/NSData.swift:590:47: note: previous same-type constraint 'T.Index' == 'T.Indices.Index' implied here
    private static func searchSubSequence<T : Collection, T2 : Sequence>(_ subSequence : T2, inSequence seq: T,anchored : Bool) -> T.Index? where T.Iterator.Element : Equatable, T.Iterator.Element == T2.Iterator.Element, T.SubSequence.Iterator.Element == T.Iterator.Element, T.Indices.Iterator.Element == T.Index {

@pushkarnk
Copy link
Member

Looks good to me. Thanks.
@swift-ci test and merge

@pushkarnk
Copy link
Member

@swift-ci test and merge

@swift-ci swift-ci merged commit c32dd4e into swiftlang:master May 8, 2017
@e78l e78l deleted the fix-warnings2 branch May 8, 2017 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants