Skip to content

Commit 2a34a62

Browse files
committed
Fix some compiler_crashers that regressed recently
1 parent 3e94baa commit 2a34a62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,11 @@ bool CalleeCandidateInfo::diagnoseAnyStructuralArgumentError(Expr *fnExpr,
17021702

17031703

17041704
auto args = decomposeArgParamType(argExpr->getType());
1705-
auto params = decomposeArgParamType(candidates[0].getArgumentType());
1705+
1706+
auto argTy = candidates[0].getArgumentType();
1707+
if (!argTy) return false;
1708+
1709+
auto params = decomposeArgParamType(argTy);
17061710

17071711
// It is a somewhat common error to try to access an instance method as a
17081712
// curried member on the type, instead of using an instance, e.g. the user

0 commit comments

Comments
 (0)