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-14412] swift-corelibs-foundation’s firstRange(of:in:) and lastRange(of:in:) do not mirror macOS Foundation behavior when searched data is empty #3230

Closed
Frizlab opened this issue Mar 28, 2021 · 0 comments

Comments

@Frizlab
Copy link
Contributor

Frizlab commented Mar 28, 2021

Previous ID SR-14412
Radar None
Original Reporter @Frizlab
Type Bug
Environment

macOS: 11.2.3 (20D91), Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)

Linux: Docker image 2510a162d49e, Swift version 5.3.3 (swift-5.3.3-RELEASE)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: e510ad147fb65e09109745e2fddd9fdd

Issue Description:

On macOS, with an empty searched data, `nil` is returned; on Linux (swift-5.3.3-RELEASE), an empty Range is returned.

I submitted a PR to mirror macOS’s behavior: #2992

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
@Frizlab Frizlab closed this as completed Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant