@@ -441,7 +441,7 @@ class SyntacticElementConstraintGenerator
441441
442442 cs.addConstraint (
443443 ConstraintKind::Conversion, elementType, initType,
444- cs.getConstraintLocator (contextualLocator ,
444+ cs.getConstraintLocator (sequenceLocator ,
445445 ConstraintLocator::SequenceElementType));
446446
447447 // Reference the makeIterator witness.
@@ -450,9 +450,10 @@ class SyntacticElementConstraintGenerator
450450
451451 Type makeIteratorType =
452452 cs.createTypeVariable (locator, TVO_CanBindToNoEscape);
453- cs.addValueWitnessConstraint (LValueType::get (sequenceType), makeIterator,
454- makeIteratorType, context.getAsDeclContext (),
455- FunctionRefKind::Compound, contextualLocator);
453+ cs.addValueWitnessConstraint (
454+ LValueType::get (sequenceType), makeIterator, makeIteratorType,
455+ context.getAsDeclContext (), FunctionRefKind::Compound,
456+ cs.getConstraintLocator (sequenceLocator, ConstraintLocator::Witness));
456457
457458 // After successful constraint generation, let's record
458459 // solution application target with all relevant information.
0 commit comments