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 bb45b60 commit fb5b9c8Copy full SHA for fb5b9c8
lib/Sema/CSDiagnostics.cpp
@@ -8202,7 +8202,9 @@ bool UnableToInferClosureReturnType::diagnoseAsError() {
8202
bool UnableToInferGenericPackElementType::diagnoseAsError() {
8203
auto *locator = getLocator();
8204
auto path = locator->getPath();
8205
- const auto packElementElt = (path.end() - 1)->getAs<LocatorPathElt::PackElement>();
+
8206
+ auto packElementElt = (path.end() - 1)->getAs<LocatorPathElt::PackElement>();
8207
+ assert(packElementElt && "Expected path to end with a pack element locator");
8208
8209
if (isExpr<NilLiteralExpr>(getAnchor())) {
8210
// `nil` appears as an element of generic pack params, let's record a
0 commit comments