We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b7b0e9 commit 9a88d61Copy full SHA for 9a88d61
lib/Sema/CSDiagnostics.cpp
@@ -2142,9 +2142,9 @@ bool TrailingClosureAmbiguityFailure::diagnoseAsNote() {
2142
return false;
2143
2144
const ParameterList *paramList = callee->getParameters();
2145
- if (paramList->getArray().empty())
+ if (!paramList || paramList->size() == 0)
2146
2147
- const ParamDecl *param = paramList->getArray().back();
+ const ParamDecl *param = paramList->back();
2148
2149
// Soundness-check that the trailing closure corresponds to this parameter.
2150
if (!param->hasInterfaceType() ||
0 commit comments