[SR-10066] Unhelpful diagnostic when keypath types don't match #52468
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
key paths
Feature: key paths (both native and Objective-C)
type checker
Area → compiler: Semantic analysis
Environment
Swift version 5.0-dev (LLVM 94d957ca75, Swift a699f84c0f)
Target: x86_64-apple-darwin18.2.0
Additional Detail from JIRA
md5: 32d36056c6f2a654e480dd34153dafee
Issue Description:
For the following code:
We emit the following diagnostic:
This could be improved to point to the actual source of the error, which is that we're trying to pass a KeyPath<C, Int> argument to a KeyPath<C, Value?> parameter.
The text was updated successfully, but these errors were encountered: