Skip to content

Commit

Permalink
Avoid IndexOutOfBoundsException in lhsUnary (#5956)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurloc authored May 22, 2024
1 parent 8997956 commit c40b1c4
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 c40b1c4

Please sign in to comment.