Skip to content

Commit f8aa602

Browse files
committed
refactoring: add a defensive check against null type. rdar://36305791 (#14014)
1 parent 35fd3d9 commit f8aa602

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
@@ -1719,6 +1719,9 @@ static std::unique_ptr<llvm::SetVector<Expr*>>
17191719
bool walkToExprPre(Expr *E) {
17201720
if (E->isImplicit())
17211721
return true;
1722+
// FIXME: we should have ErrorType instead of null.
1723+
if (E->getType().isNull())
1724+
return true;
17221725
auto ExprType = E->getType()->getNominalOrBoundGenericNominal();
17231726
//Only binary concatenation operators should exist in expression
17241727
if (E->getKind() == ExprKind::Binary) {

0 commit comments

Comments
 (0)