@@ -1505,7 +1505,7 @@ namespace {
1505
1505
// Since base type in this case is completely dependent on context it
1506
1506
// should be marked as a potential hole.
1507
1507
auto baseTy = CS.createTypeVariable (baseLocator, TVO_CanBindToNoEscape |
1508
- TVO_CanBindToHole);
1508
+ TVO_CanBindToHole);
1509
1509
setUnresolvedBaseType (expr, baseTy);
1510
1510
1511
1511
auto memberTy = CS.createTypeVariable (
@@ -1555,15 +1555,13 @@ namespace {
1555
1555
}
1556
1556
1557
1557
Type visitUnresolvedMemberChainResultExpr (
1558
- UnresolvedMemberChainResultExpr *expr) {
1558
+ UnresolvedMemberChainResultExpr *expr) {
1559
1559
auto *tail = expr->getSubExpr ();
1560
- assert (isa<UnresolvedMemberExpr>(tail) ||
1561
- isa<UnresolvedDotExpr>(tail) ||
1562
- isa<CallExpr>(tail) ||
1563
- isa<BindOptionalExpr>(tail) ||
1560
+ assert (isa<UnresolvedMemberExpr>(tail) || isa<UnresolvedDotExpr>(tail) ||
1561
+ isa<CallExpr>(tail) || isa<BindOptionalExpr>(tail) ||
1564
1562
isa<ForceValueExpr>(tail) ||
1565
1563
isa<SubscriptExpr>(tail) &&
1566
- " Unexpected expression at end of unresolved member chain" );
1564
+ " Unexpected expression at end of unresolved member chain" );
1567
1565
1568
1566
auto memberTy = CS.getType (tail);
1569
1567
auto *base = getUnresolvedChainBase (tail);
@@ -1576,16 +1574,17 @@ namespace {
1576
1574
1577
1575
// The contextual type (represented with a new type variable) must equal
1578
1576
// the base type.
1579
- auto locator = CS.getConstraintLocator (expr,
1580
- ConstraintLocator::UnresolvedMemberChainResult);
1577
+ auto locator = CS.getConstraintLocator (
1578
+ expr, ConstraintLocator::UnresolvedMemberChainResult);
1581
1579
auto tvo = additionalOptions | TVO_CanBindToHole | TVO_CanBindToNoEscape;
1582
1580
auto chainResultTy = CS.createTypeVariable (locator, tvo);
1583
1581
auto chainBaseTy = UnresolvedBaseTypes.find (base)->second ;
1584
1582
1585
1583
// The result of this element of the chain must be convertible to the
1586
1584
// contextual type, and the contextual type must be equal to the base.
1587
- CS.addConstraint (ConstraintKind::Conversion, memberTy, chainBaseTy,
1588
- CS.getConstraintLocator (tail, ConstraintLocator::RValueAdjustment));
1585
+ CS.addConstraint (
1586
+ ConstraintKind::Conversion, memberTy, chainBaseTy,
1587
+ CS.getConstraintLocator (tail, ConstraintLocator::RValueAdjustment));
1589
1588
CS.addConstraint (ConstraintKind::Conversion, memberTy, chainResultTy,
1590
1589
locator);
1591
1590
CS.addConstraint (ConstraintKind::Equal, chainBaseTy, chainResultTy,
0 commit comments