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
Version 10.0 beta (10L176w)
Toolchain: Swift Development Snapshot 2018-06-07 (a)
md5: bebede5cb57c798cb1074f352feab4f5
duplicates:
Issue Description:
The following code should not produce a warning, but does
guard let symbols = _shortStandaloneWeekdaySymbols else { let cfSymbols = CFDateFormatterCopyProperty(_cfObject, kCFDateFormatterShortStandaloneWeekdaySymbols) as! NSArray return cfSymbols.allObjects as! [String] // produces warning }
swift-corelibs-foundation/Foundation/DateFormatter.swift:399: Treating a forced downcast to '[String]' as optional will never produce 'nil'
replacing the offending line with the following removes the warning
return (cfSymbols.allObjects as? [String])!
The text was updated successfully, but these errors were encountered:
The piece that's missing here is that the result type is an IUO. We've had a few other reports of this; I'll find the dup(s) later.
Sorry, something went wrong.
No branches or pull requests
Environment
Version 10.0 beta (10L176w)
Toolchain: Swift Development Snapshot 2018-06-07 (a)
Additional Detail from JIRA
md5: bebede5cb57c798cb1074f352feab4f5
duplicates:
Issue Description:
The following code should not produce a warning, but does
swift-corelibs-foundation/Foundation/DateFormatter.swift:399: Treating a forced downcast to '[String]' as optional will never produce 'nil'
replacing the offending line with the following removes the warning
The text was updated successfully, but these errors were encountered: