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

[Backport 1.17] fix: Unary-test behavior with special input variable ? #905

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

backport-action
Copy link
Collaborator

Description

Backport of #887 to 1.17.

relates to #864
original author: @saig0

saig0 added 9 commits August 23, 2024 12:34
Add test cases to explicitly verify that a unary-test expression returns the correct output (true/false/null).

Restructure existing tests cases and group them into the different behaviors.

(cherry picked from commit 866ce00)
Introduce a new type for not recoverable errors. Compared to the existing error, this new error should stop the evaluation instead of continue the evaluation with null.

(cherry picked from commit 04abac9)
Correct the behavior of unary-test expression to return only true if an expression with the special variable `?` evaluates to true.

Identify the usage by returning a fatal error if `?` is used outside of an unary-test.

(cherry picked from commit 61cb169)
Adjust all operations to return a fatal error instead of returning null. This is required to limit the access to the special input symbol `?` outside an unary-tests.

Restructure some helper methods to restrict the handling of fatal errors to a few places. This should help to reduce possible problems with fatal errors.

Move some methods to group different aspects together.

(cherry picked from commit c967208)
(cherry picked from commit 1ba21ca)
(cherry picked from commit f171ebf)
Add a test case to verify that the input variable is not available outside of an unary-test expression.

(cherry picked from commit 8354d1b)
(cherry picked from commit 63efe64)
@backport-action backport-action requested a review from saig0 as a code owner August 23, 2024 12:34
@saig0 saig0 merged commit 4434f19 into 1.17 Aug 23, 2024
4 checks passed
@saig0 saig0 deleted the backport-887-to-1.17 branch August 23, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants