[SR-13303] Erroneous warning shown when casting protocol type to dictionary type #55743
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
macOS X 10.15.6.
Bug is present in Xcode 11.6, Xcode 12 Beta 2. It is not present in Xcode 11.3.1
Additional Detail from JIRA
md5: e1b5118e1d41c3d0c99d8fe0ff8ba714
Issue Description:
I have a protocol that a dictionary conforms to. Types can be cast from this protocol to the concrete dictionary type. This has worked for us before, but is now showing a warning. It works correctly (not showing the warning) on Xcode 11.3.1. The warning shows on Xcode 11.6; we have not tested the in between Xcodes. This issue is still present in Xcode 12 beta 2.
Sample code to reproduce:
The text was updated successfully, but these errors were encountered: