Skip to content

Commit 2edae95

Browse files
authored
Merge pull request #32438 from rintaro/cs-shrink-avoidtapexpr
[ConstraintSystem] Stop type checking TapExpr elements in shrink()
2 parents 99c78ad + d990f6c commit 2edae95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,12 @@ void ConstraintSystem::shrink(Expr *expr) {
800800
return {false, expr};
801801
}
802802

803+
// Similar to 'ClosureExpr', 'TapExpr' has a 'VarDecl' the type of which
804+
// is determined by type checking the parent interpolated string literal.
805+
if (isa<TapExpr>(expr)) {
806+
return {false, expr};
807+
}
808+
803809
if (auto coerceExpr = dyn_cast<CoerceExpr>(expr)) {
804810
if (coerceExpr->isLiteralInit())
805811
ApplyExprs.push_back({coerceExpr, 1});

0 commit comments

Comments
 (0)