[SR-2928] Collection casts from collections of optionals to collections of Any need custom handling
| Previous ID | SR-2928 |
| Radar | None |
| Original Reporter | @rudkx |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, DiagnosticsQoI, TypeChecker |
| Assignee | @hamishknight |
| Priority | Medium |
md5: 343ed5a8a2671897104288f18d766e37
relates to:
- SR-2921 Some implicitly coerced from
to Any warnings missing a source location
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.
Is this the same as SR-2921?
No as I mention in the description I'm going to fix the source location information called out in SR-2921, but doing that doesn't fix the more general issue that the warnings aren't ideally, and the fixits are broken. I don't have time to fix that at the moment, but at least fixing the source location will make it possible for people to know where these are coming from.