Skip to content

Commit 662238d

Browse files
committed
Corrected off-by-one error.
1 parent 421514f commit 662238d

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
@@ -5666,7 +5666,7 @@ void Parser::parseAbstractFunctionBody(AbstractFunctionDecl *AFD) {
56665666
}
56675667
} else if (auto *E = Element.dyn_cast<Expr *>()) {
56685668
if (auto SE = dyn_cast<SequenceExpr>(E->getSemanticsProvidingExpr())) {
5669-
if (SE->getNumElements() > 0 && isa<AssignExpr>(SE->getElement(1))) {
5669+
if (SE->getNumElements() > 1 && isa<AssignExpr>(SE->getElement(1))) {
56705670
// This is an assignment. We don't want to implicitly return
56715671
// it.
56725672
return;

0 commit comments

Comments
 (0)