@@ -441,7 +441,7 @@ class SyntacticElementConstraintGenerator
441
441
442
442
cs.addConstraint (
443
443
ConstraintKind::Conversion, elementType, initType,
444
- cs.getConstraintLocator (contextualLocator ,
444
+ cs.getConstraintLocator (sequenceLocator ,
445
445
ConstraintLocator::SequenceElementType));
446
446
447
447
// Reference the makeIterator witness.
@@ -450,9 +450,10 @@ class SyntacticElementConstraintGenerator
450
450
451
451
Type makeIteratorType =
452
452
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));
456
457
457
458
// After successful constraint generation, let's record
458
459
// solution application target with all relevant information.
0 commit comments