mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Since key path root is now transitively inferred. Key path type inference can be delayed until key path is resolved enough to infer its capability. This solves multiple problems: - Inference fully controls what key path type is bound to; - KeyPath constraint simplification doesn't have to double-check the capability and attempt to re-bind key path type; - Custom logic to resolve key path type is no longer necessary; - Diagnostics are improved because capability and root/value type mismatch are diagnosed when key path is matched against the contextual type.
606 KiB
606 KiB