lib/core: fix `Iterator::to_a` not calling `finish`
[nit.git] / lib / core / collection / array.nit
index 8747c8b..79e7a70 100644 (file)
@@ -793,7 +793,7 @@ class ArrayMap[K, E]
        redef fun clone
        do
                var res = new ArrayMap[K,E]
-               res.recover_with self
+               res.add_all self
                return res
        end
 end
@@ -955,6 +955,7 @@ redef class Iterator[E]
                        res.add(item)
                        next
                end
+               finish
                return res
        end
 end