swift
ea0fb6e6 - [TypeChecker] Improve contextual mismatch diagnostics for key path

Commit
6 years ago
[TypeChecker] Improve contextual mismatch diagnostics for key path Detect situations where key path doesn't have capability required by the context e.g. read-only vs. writable, or either root or value types are incorrect e.g. ```swift struct S { let foo: Int } let _: WritableKeyPath<S, Int> = \.foo ``` Here context requires a writable key path but `foo` property is read-only. (cherry picked from commit 94977ee17573146d6f058b76c7d9c81d43b7aab2)
Author
Committer
Parents
Loading