lib/array: do not cache reverse iterators as forward iterators
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 15 Jul 2015 20:56:42 +0000 (16:56 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 15 Jul 2015 20:56:42 +0000 (16:56 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/standard/collection/array.nit

index b6721df..ce89435 100644 (file)
@@ -553,6 +553,9 @@ private class ArrayReverseIterator[E]
        do
                _index = _array.length - 1
        end
+
+       # Do not cache `self`
+       redef fun finish do end
 end
 
 # Others collections ##########################################################