mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously we would generate the following constraint here, where 'index' and 'output' are concrete types and $input is a type variable: - ValueMember(base, $input -> output) - ArgumentTupleConversion(index, $input) The problem is that we built a function type where the entire input was a type variable, which would then bind to an argument list. We could instead generate this constraint: - ValueMember(base, $member) - ApplicableFunction(index -> output, $member) I also had to redo how keypaths map locators back to key path components. Previously the ArgumentTupleConversion was created with a locator ending in KeyPathComponent. Now the ApplicableFunction is created with this locator, which means the argument match is performed with a locator ending in ApplyArgument. A consequence of this is that the SubscriptIndex and SubscriptResult locator path elements are no longer used, so remove them. This requires various mechanical changes in places we look at locators to handle this change. Should be NFC.
6.6 KiB
6.6 KiB