Skip to content

Change argument label #41089

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
Feb 1, 2022
Merged

Change argument label #41089

merged 1 commit into from
Feb 1, 2022

Conversation

philipturner
Copy link
Contributor

Why is this named bounds when it's position for other collection types? For example: https://github.com/apple/swift/blob/2696df4f22dbb37d19be132da36341de94960a30/stdlib/public/core/BidirectionalCollection.swift#L215

Will changing the argument label have any effects on third-party clients? I tried the following and it isn't possible:

print(RangeReplaceableCollection.subscript(bounds:)) // emits an error

extension RangeReplaceableCollection {
  // emits an error for "could not find `subscript(bounds:)` in scope"
  @derivative(of: subscript(bounds:))
  func foo() -> (value: Void, pullback: (Void) -> Void) {}
}

@CodaFi
Copy link
Contributor

CodaFi commented Jan 31, 2022

Yeah, looks like a copy-and-paste mistake. Interior argument labels are not ABI in subscripts and there is no source impact for altering them.

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 89bb2b5 into swiftlang:main Feb 1, 2022
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