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-3202] Some of properties of Locale.current object are not filled … #1020

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

saiHemak
Copy link
Contributor

…on Linux

@alblue
Copy link
Contributor

alblue commented May 31, 2017

@swift-ci please test

@ianpartridge
Copy link
Contributor

Failure caused by GitHub outage.

@pushkarnk
Copy link
Member

@swift-ci please test

@pushkarnk
Copy link
Member

pushkarnk commented Jun 1, 2017

OK, I get what the problem was.

CFLocaleGetValue called from object(forKey:) always returns AnyObject. Subsequently for the different Locale properties, when we tried to conditionally cast it to a String, a nil was returned (this is what SR-3202 is).

This fix first converts the AnyObject/NSString to String by using _SwiftValue.fetch, due to which a forced downcast in localeIdentifier fails . The second part of the fix removes the forced downcast.

@pushkarnk
Copy link
Member

LGTM

@swift-ci please 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.

5 participants