Skip to content

Commit d72515a

Browse files
committed
Strengthen assertions further
1 parent 45579b6 commit d72515a

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
@@ -3947,9 +3947,10 @@ namespace {
39473947

39483948
Type visitTapExpr(TapExpr *expr) {
39493949
DeclContext *varDC = expr->getVar()->getDeclContext();
3950+
ASSERT(varDecl != nullptr);
39503951
ASSERT((varDC == CS.DC ||
3951-
(varDC && isa<AbstractClosureExpr>(varDC)) ||
3952-
(varDC && varDC->isChildContextOf(CS.DC))) &&
3952+
isa<AbstractClosureExpr>(varDC) ||
3953+
varDC->isChildContextOf(CS.DC)) &&
39533954
"TapExpr var should be in the same DeclContext we're checking it in!");
39543955

39553956
auto locator = CS.getConstraintLocator(expr);

0 commit comments

Comments
 (0)