mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Move another chunk of lvalue diagnostics over to being handled via ConstraintFix.
This commit is contained in:
@@ -2450,6 +2450,11 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
TreatRValueAsLValue::create(*this, getConstraintLocator(locator)));
|
||||
}
|
||||
}
|
||||
|
||||
if (type2->is<LValueType>() && !isTypeVarOrMember1) {
|
||||
conversionsOrFixes.push_back(
|
||||
TreatRValueAsLValue::create(*this, getConstraintLocator(locator)));
|
||||
}
|
||||
}
|
||||
|
||||
if (conversionsOrFixes.empty()) {
|
||||
@@ -4659,11 +4664,11 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
|
||||
addContextualScore();
|
||||
// Unwrap an inout type.
|
||||
auto obj1 = type1->getInOutObjectType();
|
||||
|
||||
|
||||
obj1 = getFixedTypeRecursive(obj1, false, false);
|
||||
|
||||
auto t2 = type2->getDesugaredType();
|
||||
|
||||
|
||||
auto baseType1 = getFixedTypeRecursive(*isArrayType(obj1), false, false);
|
||||
auto baseType2 = getBaseTypeForPointer(*this, t2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user