Skip to content

Commit 2be845e

Browse files
author
li3zhen1
committed
[CSDiagnostics] Change error of infer pack element to use 0-based index in messages
1 parent e513a7a commit 2be845e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8230,7 +8230,7 @@ bool UnableToInferGenericPackElementType::diagnoseAsError() {
82308230
getParameterAt(decl, applyArgToParamElt->getParamIdx())) {
82318231
emitDiagnosticAt(
82328232
paramDecl->getLoc(), diag::note_in_opening_pack_element,
8233-
packElementElt->getIndex() + 1, paramDecl->getNameStr());
8233+
packElementElt->getIndex(), paramDecl->getNameStr());
82348234
}
82358235
}
82368236
}

0 commit comments

Comments
 (0)