mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Rename @lvalue Locator Path Element
8271c1a removed the last hacky usage of ArrayElementType,
leaving behind just the @lvalue-to-inout conversions. Rename
the locator path element to reflect this and do a bit of cleanup on the
unrelated-but-near-enough other hack RValueAdjustment.
This commit is contained in:
@@ -1925,7 +1925,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
cast<LValueType>(desugar2)->getObjectType(),
|
||||
ConstraintKind::Equal, subflags,
|
||||
locator.withPathElement(
|
||||
ConstraintLocator::ArrayElementType));
|
||||
ConstraintLocator::LValueConversion));
|
||||
|
||||
case TypeKind::InOut:
|
||||
// If the RHS is an inout type, the LHS must be an @lvalue type.
|
||||
@@ -1936,7 +1936,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
return matchTypes(cast<InOutType>(desugar1)->getObjectType(),
|
||||
cast<InOutType>(desugar2)->getObjectType(),
|
||||
ConstraintKind::Equal, subflags,
|
||||
locator.withPathElement(ConstraintLocator::ArrayElementType));
|
||||
locator.withPathElement(ConstraintLocator::LValueConversion));
|
||||
|
||||
case TypeKind::UnboundGeneric:
|
||||
llvm_unreachable("Unbound generic type should have been opened");
|
||||
@@ -2303,7 +2303,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
return matchTypes(type1, LValueType::get(iot->getObjectType()),
|
||||
kind, subflags,
|
||||
locator.withPathElement(
|
||||
ConstraintLocator::ArrayElementType));
|
||||
ConstraintLocator::LValueConversion));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2337,7 +2337,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
return matchTypes(iot->getObjectType(), lvt->getObjectType(),
|
||||
ConstraintKind::Bind, subflags,
|
||||
locator.withPathElement(
|
||||
ConstraintLocator::ArrayElementType));
|
||||
ConstraintLocator::LValueConversion));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user