mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Remove RValueAdjustment locator element
It was used for unresolved member and `.dynamicType` references as well as a couple of other places, but now unresolved member references no longer need that due to new implicit "chain result" AST node and other places could use more precise locators e.g. new `.dynamicType` locator or `sequence element` for `for in` loops.
This commit is contained in:
@@ -810,10 +810,10 @@ protected:
|
||||
VarDecl *arrayVar = buildVar(loc);
|
||||
Type arrayElementType = cs->createTypeVariable(
|
||||
cs->getConstraintLocator(forEachStmt), 0);
|
||||
cs->addConstraint(
|
||||
ConstraintKind::Equal, cs->getType(bodyVar), arrayElementType,
|
||||
cs->getConstraintLocator(
|
||||
forEachStmt, ConstraintLocator::RValueAdjustment));
|
||||
cs->addConstraint(ConstraintKind::Equal, cs->getType(bodyVar),
|
||||
arrayElementType,
|
||||
cs->getConstraintLocator(
|
||||
forEachStmt, ConstraintLocator::SequenceElementType));
|
||||
Type arrayType = ArraySliceType::get(arrayElementType);
|
||||
cs->setType(arrayVar, arrayType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user