We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Attachment: Download
OS X El Capitan 10.11.6, Xcode 8 GM, Swift 3.0.
md5: 07fa77359cdddc75ce1ef832a3be15ab
Issue Description:
This code:
1> import Foundation 2> URL(string: "http://www.google.com")?.lastPathComponent
returns a garbage string, like in the screenshot attached.
This is also reproducible using NSURL in Swift 2.2, Xcode 7.3.1. I get an empty string when doing the same in Objective-C with the macOS 10.12 SDK:
NSURL
@import Foundation; void main() { NSString *s = [[NSURL URLWithString: @"http://www.google.com"] lastPathComponent]; NSLog(@"%lu", (unsigned long)s.length); // Logs "0" }
This may be related to SR-2581 which also seems to return a garbage string from a URL method, but I wasn't able to reproduce that issue in Swift 2.2.
URL
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Attachment: Download
Environment
OS X El Capitan 10.11.6, Xcode 8 GM, Swift 3.0.
Additional Detail from JIRA
md5: 07fa77359cdddc75ce1ef832a3be15ab
Issue Description:
This code:
returns a garbage string, like in the screenshot attached.
This is also reproducible using
NSURL
in Swift 2.2, Xcode 7.3.1. I get an empty string when doing the same in Objective-C with the macOS 10.12 SDK:This may be related to SR-2581 which also seems to return a garbage string from a
URL
method, but I wasn't able to reproduce that issue in Swift 2.2.The text was updated successfully, but these errors were encountered: