[SR-2928] Collection casts from collections of optionals to collections of Any need custom handling #45522
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 343ed5a8a2671897104288f18d766e37
relates to:
Issue Description:
Currently for a collection cast from something like [Int?] to [Any] we emit warnings without a source location (SR-2921).
We also emit a misleading warning (complaining about the element types, not the collection types), and bogus fixits that are not only the wrong thing to do, but don't actually silence the warning (in the case of the 'as Any') case.
I am going to fix the source location issue now, but we need to come back and make a custom warning for this and fix the fixits.
The text was updated successfully, but these errors were encountered: