Skip to content

Commit

Permalink
Avoid IndexOutOfBoundsException in lhsUnary
Browse files Browse the repository at this point in the history
  • Loading branch information
yurloc committed May 16, 2024
1 parent dce66de commit bcdd2a8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,10 @@ public BaseDescr visitLhsUnary(DRLParser.LhsUnaryContext ctx) {
.build();
children.forEach(andDescr::addDescr);
return andDescr;
} else {
// size == 1. children never be empty
} else if (children.size() == 1) {
return children.get(0);
} else {
return null; // only caused by a parser error
}
}

Expand Down

0 comments on commit bcdd2a8

Please sign in to comment.