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
Apple Swift version 5.0-dev (LLVM eb302e257f, Clang a113643bc4, Swift 646034c) Target: x86_64-apple-darwin18.2.0
md5: ec7bbde0897708940075adc9253e1aca
Issue Description:
In Swift 4.2 the following cast correctly succeeds:
func test<T>(_ type: T.Type) -> T? { return Any?.none as? T } print(test(Bool?.self)) // Optional(nil)
However, as discovered on the forums, in Swift 5 it incorrectly fails and prints nil instead. This does appear to be fixed on master, but we should add a test case.
nil
The text was updated successfully, but these errors were encountered:
cc @jckarter, @slavapestov
Sorry, something went wrong.
@mikeash took a look, and it looks like this is fixed in the most recent Swift 5 snapshots.
hamishknight
No branches or pull requests
Environment
Apple Swift version 5.0-dev (LLVM eb302e257f, Clang a113643bc4, Swift 646034c)
Target: x86_64-apple-darwin18.2.0
Additional Detail from JIRA
md5: ec7bbde0897708940075adc9253e1aca
Issue Description:
In Swift 4.2 the following cast correctly succeeds:
However, as discovered on the forums, in Swift 5 it incorrectly fails and prints
nil
instead. This does appear to be fixed on master, but we should add a test case.The text was updated successfully, but these errors were encountered: