Skip to content

Commit 26085ff

Browse files
committed
Strengthen assertions further
1 parent 7b99231 commit 26085ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/CSGen.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3924,9 +3924,10 @@ namespace {
39243924

39253925
Type visitTapExpr(TapExpr *expr) {
39263926
DeclContext *varDC = expr->getVar()->getDeclContext();
3927+
ASSERT(varDecl != nullptr);
39273928
ASSERT((varDC == CS.DC ||
3928-
(varDC && isa<AbstractClosureExpr>(varDC)) ||
3929-
(varDC && varDC->isChildContextOf(CS.DC))) &&
3929+
isa<AbstractClosureExpr>(varDC) ||
3930+
varDC->isChildContextOf(CS.DC)) &&
39303931
"TapExpr var should be in the same DeclContext we're checking it in!");
39313932

39323933
auto locator = CS.getConstraintLocator(expr);

0 commit comments

Comments
 (0)