Skip to content

Unary tests behave different when evaluated directly or via an expression using the keyword "in" #768

@till-stadtler

Description

@till-stadtler

Describe the bug
The following unary test, which in itself does not make a lot of sense, behaves differently when being evaluated as a unary test and when being evaluated via an expression using the keyword "in":

Input value: 5
Unary test: not(7)
// returns: true
// expected: true

Expressions: 5 in not(7)
// returns: false
// expected: true

Further examination:
In a unary test, not() is evaluated after the evaluation of the given unary test. In an expression, not() is only used to negate a boolean. It seems that the expression 5 in not(7) is evaluated as 5 in null.

To Reproduce
Steps to reproduce the behavior:
Enter the expressions above in the FEEL Playground.

Expected behavior
Unary tests and expressions using the keyword "in" should behave the same.

Environment

  • FEEL engine version: 1.17.3
  • Affects:
    • Zeebe: 8.3.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions