Skip to content

Commit f8ef213

Browse files
committed
Corrected off-by-one error.
1 parent 843ac0b commit f8ef213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5685,7 +5685,7 @@ void Parser::parseAbstractFunctionBody(AbstractFunctionDecl *AFD) {
56855685
}
56865686
} else if (auto *E = Element.dyn_cast<Expr *>()) {
56875687
if (auto SE = dyn_cast<SequenceExpr>(E->getSemanticsProvidingExpr())) {
5688-
if (SE->getNumElements() > 0 && isa<AssignExpr>(SE->getElement(1))) {
5688+
if (SE->getNumElements() > 1 && isa<AssignExpr>(SE->getElement(1))) {
56895689
// This is an assignment. We don't want to implicitly return
56905690
// it.
56915691
return;

0 commit comments

Comments
 (0)