Skip to content

Commit a73b767

Browse files
authored
refactoring: add a defensive check against null type. rdar://36305791 (#14014)
1 parent 6e92de8 commit a73b767

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,9 @@ static std::unique_ptr<llvm::SetVector<Expr*>>
17171717
bool walkToExprPre(Expr *E) {
17181718
if (E->isImplicit())
17191719
return true;
1720+
// FIXME: we should have ErrorType instead of null.
1721+
if (E->getType().isNull())
1722+
return true;
17201723
auto ExprType = E->getType()->getNominalOrBoundGenericNominal();
17211724
//Only binary concatenation operators should exist in expression
17221725
if (E->getKind() == ExprKind::Binary) {

0 commit comments

Comments
 (0)