diff --git a/distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso b/distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso index 412dce0fb472..ef418d6d7d55 100644 --- a/distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso +++ b/distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso @@ -748,9 +748,9 @@ type Vector this.fold Map.empty state-> item-> key = Mixed_Types_Map_Key (on item) - if (state.get_or_else key False) then state else + if (state.get_or_else key False) then existing else builder.append item - state.insert key True + existing.insert key True builder.to_vector diff --git a/test/Tests/src/Data/Vector_Spec.enso b/test/Tests/src/Data/Vector_Spec.enso index a4faf6b1b977..b4574db39e05 100644 --- a/test/Tests/src/Data/Vector_Spec.enso +++ b/test/Tests/src/Data/Vector_Spec.enso @@ -257,9 +257,9 @@ spec = Test.group "Vectors" <| [1, 3, 1, 2, 2, 1].distinct . should_equal [1, 3, 2] ["a", "a", "a"].distinct . should_equal ["a"] [].distinct . should_equal [] - [1, 1.0, 2, 2.0].distinct . should_equal [1, 2] Test.specify "should return a vector containing only unique mixed type elements" <| + [1, 1.0, 2, 2.0].distinct . should_equal [1, 2] ["a", 2].distinct . should_equal ["a", 2] [2, "a", Integer, "a", 2].distinct . should_equal [2, "a", Integer]