camunda / feel-scala

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

union() doesn't work for context items #772

Open saig0 opened 7 months ago

saig0 commented 7 months ago

Describe the bug The built-in function union doesn't filter duplicates for a list of context items.

union([{x:1},{x:2},{x:1}])

To Reproduce Steps to reproduce the behavior:

  1. Evaluate the expression
    union([{x:1},{x:2},{x:1}])
  2. Verify that the result contains {x:1} twice

Expected behavior The function union() should filter duplicates for a list of context items.

union([{x:1},{x:2},{x:1}])
// [{"x":1},{"x":2}]

Environment