Skip to content

Commit feb0f34

Browse files
author
Amritpan Kaur
committed
[CSSimplify] For function type binding for key path types, add flag
to allow it to go through resolveKeyPath in matchTypesBindTypeVar.
1 parent b2f46ba commit feb0f34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6827,8 +6827,9 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
68276827
// unexpected state for key path diagnostics should we fail.
68286828
if (locator->isLastElement<LocatorPathElt::KeyPathType>() &&
68296829
type2->is<AnyFunctionType>())
6830-
return matchTypesBindTypeVar(typeVar1, type2, kind, flags, locator,
6831-
formUnsolvedResult);
6830+
return matchTypesBindTypeVar(typeVar1, type2, kind,
6831+
flags | TMF_BindingTypeVariable,
6832+
locator, formUnsolvedResult);
68326833
}
68336834

68346835
// Performance optimization: Propagate fully or partially resolved

0 commit comments

Comments
 (0)