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-1886] Nullability of arguments are incompatible between NSString.getLineStart(_:end:contentsEnd:for:) and String.getLineStart(_:end:contentsEnd:for:) #44495

Open
norio-nomura opened this issue Jun 23, 2016 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SDKOverlay standard library Area: Standard library umbrella

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-1886
Radar None
Original Reporter @norio-nomura
Type Bug
Environment

Swift 3.0 Preview 1

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, SDKOverlay
Assignee None
Priority Medium

md5: 3a78bf397493125821ef5ab7f66526d4

Issue Description:

NSString allows nil,

public func getLineStart(_ startPtr: UnsafeMutablePointer<Int>?, end lineEndPtr: UnsafeMutablePointer<Int>?, contentsEnd contentsEndPtr: UnsafeMutablePointer<Int>?, for range: NSRange)

but String does not:

public func getLineStart(_ start: UnsafeMutablePointer<Index>, end: UnsafeMutablePointer<Index>, contentsEnd: UnsafeMutablePointer<Index>, for range: Range<Index>)

I think String is not right.

@belkadan
Copy link
Contributor

cc @phausler

@Dante-Broggi
Copy link
Contributor

This difference is still existent in the Xcode 9.4.1 toolchain.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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. SDKOverlay standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants