mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
6c211745f6
It looks like originally, we would only infer bindings from a KeyPath type, which has invariant generic arguments. However, nowadays we can infer a keypath root type from a function type as well, because we allow keypath to function conversions. So, if we inferred the key path root type through a function type, then in fact we cannot introduce it as an exact binding, and we must preserve variance. This fixes a test failure that appears with a subsequent change I'm making.