Skip to content

Commit 805df61

Browse files
committed
[CSSimplify] Adjust value witness constraint to record witness declaration
1 parent 6f8a0c1 commit 805df61

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
@@ -9728,7 +9728,12 @@ ConstraintSystem::simplifyValueWitnessConstraint(
97289728
if (resolvedBaseType->isTypeVariableOrMember())
97299729
return formUnsolved();
97309730

9731-
auto choice = OverloadChoice(resolvedBaseType, requirement, functionRefKind);
9731+
auto witness =
9732+
conformance.getWitnessByName(baseObjectType, requirement->getName());
9733+
if (!witness)
9734+
return SolutionKind::Error;
9735+
9736+
auto choice = OverloadChoice(resolvedBaseType, witness.getDecl(), functionRefKind);
97329737
resolveOverload(getConstraintLocator(locator), memberType, choice,
97339738
useDC);
97349739
return SolutionKind::Solved;

0 commit comments

Comments
 (0)