[SR-13079] Improve diagnostics for key path root inferred as optional types #55525
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 6a88f5bab5246df2825c3f8a7bab7248
Issue Description:
The following example gives
Since `String?.count` is not allowed and we can't convert from `String?` to `String` in the key path root context.
We should improve this to diagnose something that emphasizes that the problem is with the key path's root type being inferred to an optional type.
The text was updated successfully, but these errors were encountered: