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

string() function returns a string for a null value #748

Closed saig0 closed 11 months ago

saig0 commented 11 months ago

Describe the bug If I invoke the string() function with null, the function returns a string "null".

This behavior is different compared to previous versions of the FEEL engine (i.e. a regression).

To Reproduce Steps to reproduce the behavior:

  1. Evaluate the expression
    string(null)
  2. Verify that the result is a string
    "null"

Expected behavior If I invoke the string() function with null, it should return null (i.e. a null value, not a string).

Screenshot from 2023-10-20 13-24-55

(DMN 1.5, 10.3.4.1 Conversion functions, page 138)

Related DMN-TCK test case 0079-feel-string-function.

Environment