Skip to content

Commit 141be4a

Browse files
committed
Tweak constraints to improve performance
1 parent 1a34d43 commit 141be4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ namespace {
12671267
// The semanticExpr must have the same type as this node.
12681268
auto semanticTV = CS.getType(semanticExpr);
12691269
auto semanticLocator = CS.getConstraintLocator(semanticExpr);
1270-
CS.addConstraint(ConstraintKind::Equal, tv, semanticTV,
1270+
CS.addConstraint(ConstraintKind::Bind, tv, semanticTV,
12711271
semanticLocator);
12721272
}
12731273
else if (auto appendingExpr = expr->getAppendingExpr()) {
@@ -3129,7 +3129,7 @@ namespace {
31293129

31303130
if (auto subExpr = expr->getSubExpr()) {
31313131
auto subExprType = CS.getType(subExpr);
3132-
CS.addConstraint(ConstraintKind::Equal, subExprType, tv, locator);
3132+
CS.addConstraint(ConstraintKind::Bind, subExprType, tv, locator);
31333133
}
31343134

31353135
return tv;

0 commit comments

Comments
 (0)