Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Painless void return bug #38046

Merged
merged 2 commits into from
Jan 31, 2019
Merged

Fix Painless void return bug #38046

merged 2 commits into from
Jan 31, 2019

Conversation

jdconrad
Copy link
Contributor

Painless did not allow return statements to be used without an expression attached prior to this change. Painless scripts could not use an empty return statement for contexts and functions that had a void return type. This PR fixes that bug.

Note this change appears large, but most of the lines are regenerated ANTLR from a single line grammar change.

@jdconrad jdconrad added >bug :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v7.0.0 v6.7.0 labels Jan 30, 2019
@jdconrad jdconrad requested a review from rjernst January 30, 2019 18:40
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jdconrad
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdconrad jdconrad merged commit e066a59 into elastic:master Jan 31, 2019
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Jan 31, 2019
Painless now allows void functions and contexts to with a void return type to use
a return statement without a following expression.
@jdconrad
Copy link
Contributor Author

@rjernst Thanks for the review!

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 31, 2019
…ersion

* elastic/master:
  Do not set up NodeAndClusterIdStateListener in test (elastic#38110)
  ML: better handle task state race condition (elastic#38040)
  Soft-deletes policy should always fetch latest leases (elastic#37940)
  Handle scheduler exceptions (elastic#38014)
  Minor logging improvements (elastic#38084)
  Fix Painless void return bug (elastic#38046)
  Update PutFollowAction serialization post-backport (elastic#37989)
  fix a few versionAdded values in ElasticsearchExceptions (elastic#37877)
  Reenable BWC tests after backport of elastic#37899 (elastic#38093)
  Mute failing test
  Mute failing test
  Fail start on obsolete indices documentation (elastic#37786)
  SQL: Implement FIRST/LAST aggregate functions (elastic#37936)
  Un-mute NoMasterNodeIT.testNoMasterActionsWriteMasterBlock
  remove unused parser fields in RemoteResponseParsers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v6.7.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants