Skip to content

Commit ab49681

Browse files
committed
Fix Painless void return bug (#38046)
Painless now allows void functions and contexts to with a void return type to use a return statement without a following expression.
1 parent e73140e commit ab49681

File tree

5 files changed

+535
-461
lines changed

5 files changed

+535
-461
lines changed

modules/lang-painless/src/main/antlr/PainlessParser.g4

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dstatement
5555
| declaration # decl
5656
| CONTINUE # continue
5757
| BREAK # break
58-
| RETURN expression # return
58+
| RETURN expression? # return
5959
| THROW expression # throw
6060
| expression # expr
6161
;

0 commit comments

Comments
 (0)