Skip to content

Commit e39a81f

Browse files
committed
[CSSimplify] Adjust value witness constraint to record witness declaration
1 parent 164fa9c commit e39a81f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9722,7 +9722,12 @@ ConstraintSystem::simplifyValueWitnessConstraint(
97229722
if (resolvedBaseType->isTypeVariableOrMember())
97239723
return formUnsolved();
97249724

9725-
auto choice = OverloadChoice(resolvedBaseType, requirement, functionRefKind);
9725+
auto witness =
9726+
conformance.getWitnessByName(baseObjectType, requirement->getName());
9727+
if (!witness)
9728+
return SolutionKind::Error;
9729+
9730+
auto choice = OverloadChoice(resolvedBaseType, witness.getDecl(), functionRefKind);
97269731
resolveOverload(getConstraintLocator(locator), memberType, choice,
97279732
useDC);
97289733
return SolutionKind::Solved;

0 commit comments

Comments
 (0)