[SR-13554] Misleading error "cannot assign value of type 'T' to type 'T'" for shadowed generic type #55991
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: 905ab060d96abfd26a4e6fec0bd2fd11
Issue Description:
The following code:
… produces the following error:
The error message here is bad: It should hint at
T
being shadowed.The
as! T
is also gonna lead to more problems, rather than less. I can count the times that adding a force cast solved a random compilation error on a single hand.The text was updated successfully, but these errors were encountered: