Skip to content

Fix for SR-3634: Error while accessing Locale.availableIdentifiers #944

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
Apr 11, 2017

Conversation

mamabusi
Copy link
Contributor

No description provided.

@@ -97,7 +97,7 @@ extension NSLocale {
open class var availableLocaleIdentifiers: [String] {
var identifiers = Array<String>()
for obj in CFLocaleCopyAvailableLocaleIdentifiers()._nsObject {
identifiers.append((obj as! NSString)._swiftObject)
identifiers.append(obj as! String)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At runtime type of 'obj' is received as String and the caste from Swift.String to Foundation.NSString fails.

@parkera
Copy link
Contributor

parkera commented Apr 11, 2017

@swift-ci test and merge

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