Skip to content

Commit

Permalink
fix: duplicate values() for context entries
Browse files Browse the repository at this point in the history
Return duplicated context entries from list.

(cherry picked from commit a47d835)
  • Loading branch information
saig0 committed Sep 3, 2024
1 parent e43f03f commit a56afb5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,10 @@ class ListBuiltinFunctions(private val valueMapper: ValueMapper) {
builtinFunction(
params = List("list"),
invoke = { case List(ValList(list)) =>
ValList(list.distinct.filter(x => list.count(_ == x) > 1))
val duplicatedValues =
distinct(list).filter(x => list.count(valueComparator.equals(_, x)) > 1)

ValList(duplicatedValues)
}
)

Expand Down

0 comments on commit a56afb5

Please sign in to comment.