You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I adjusted the expected behavior. If the position is 0, the function should return null.
@mdouaihy suggested returning the original list. According to the DMN specification, zero is an invalid argument. Returning null aligns with other functions.
Describe the bug
The feel expression
remove([1,2,3], 0)
returns[1,2,3,1,2,3]
.This bug is due to the below code
The goal of this code is to
list.take(listIndex(list, position.intValue))
list.drop(listIndex(list, position.intValue + 1)
The problem is
listIndex(list, position.intValue)
returns 3 andlistIndex(list, position.intValue + 1)
is returning 0.where ``````
To Reproduce
Execute the feel expression
remove([1,2,3], 0)
Expected behavior
Returns
null
since position0
is an invalid argument.Environment
The text was updated successfully, but these errors were encountered: