Skip to content

Commit

Permalink
Fixes #1038 - regression during some error syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <stryker@redhat.com>
  • Loading branch information
Rob Stryker committed Dec 12, 2024
1 parent dc4db81 commit dcbdae1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,9 @@ private Expression convertLiteral(JCLiteral literal) {
}

private Statement convertStatement(JCStatement javac, ASTNode parent) {
if (TreeInfo.getEndPos(javac, this.javacCompilationUnit.endPositions) <= javac.getPreferredPosition()) {
int endPos = TreeInfo.getEndPos(javac, this.javacCompilationUnit.endPositions);
int preferredPos = javac.getPreferredPosition();
if (endPos < preferredPos) {
return null;
}
if (javac instanceof JCReturn returnStatement) {
Expand Down

0 comments on commit dcbdae1

Please sign in to comment.