[SR-9837] Optional<T>.none -> Optional<U>.none casting regression in generic context #52251
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
runtime
The Swift Runtime
swift 5.0
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: