mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSSimplify] For function type binding for key path types, add flag
to allow it to go through resolveKeyPath in matchTypesBindTypeVar.
This commit is contained in:
@@ -6827,8 +6827,9 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
// unexpected state for key path diagnostics should we fail.
|
||||
if (locator->isLastElement<LocatorPathElt::KeyPathType>() &&
|
||||
type2->is<AnyFunctionType>())
|
||||
return matchTypesBindTypeVar(typeVar1, type2, kind, flags, locator,
|
||||
formUnsolvedResult);
|
||||
return matchTypesBindTypeVar(typeVar1, type2, kind,
|
||||
flags | TMF_BindingTypeVariable,
|
||||
locator, formUnsolvedResult);
|
||||
}
|
||||
|
||||
// Performance optimization: Propagate fully or partially resolved
|
||||
|
||||
Reference in New Issue
Block a user