[Sema] Remove unneeded uses of TVO_CanBindToInOut

This commit is contained in:
David Zarzycki
2018-03-28 13:24:10 -04:00
parent 99ccfb1c41
commit c8e17157af
6 changed files with 59 additions and 104 deletions

View File

@@ -2542,7 +2542,6 @@ ConstraintSystem::simplifyConstructionConstraint(
ConstraintLocator::ApplyFunction);
auto tv = createTypeVariable(applyLocator,
TVO_CanBindToLValue |
TVO_CanBindToInOut |
TVO_PrefersSubtypeBinding);
// The constructor will have function type T -> T2, for a fresh type
@@ -4701,9 +4700,7 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
return SolutionKind::Error;
auto constraintLocator = getConstraintLocator(locator);
auto tv = createTypeVariable(constraintLocator,
TVO_PrefersSubtypeBinding |
TVO_CanBindToInOut);
auto tv = createTypeVariable(constraintLocator, TVO_PrefersSubtypeBinding);
addConstraint(ConstraintKind::ConformsTo, tv,
hashableProtocol->getDeclaredType(), constraintLocator);