camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
123 stars 50 forks source link

Null in unary-test expressions should resolve to `ValNull` #679

Closed remcowesterhoud closed 1 year ago

remcowesterhoud commented 1 year ago

Describe the bug A comparison using null or a non-existing variable should resolve to a ValNull, except when it comes to comparisons. E.g.:

// Non existing less than
non-existing < 10
    ValNull

// null greater than
null > 10
    ValNull

For unary-test expressions one would expect the same behavior:

// Expected
null in < 10
    ValNull

Instead, it will return a ValBoolean(true):

// Actual
null in < 10
    ValBoolean(true)

Note that this is a regression introduced in #676. Before the return of these expressions would be ValBoolean(false)! There are tests verifying these that are ignored for now. They must be unignored when this is fixed:

Environment