lib/map: make concrete `Map.keys` and `Map.values` lazy
[nit.git] / lib / standard / collection / hash_collection.nit
index cdc7906..e5ff507 100644 (file)
@@ -272,8 +272,8 @@ class HashMap[K, V]
                enlarge(0)
        end
 
-       redef var keys: RemovableCollection[K] = new HashMapKeys[K, V](self)
-       redef var values: RemovableCollection[V] = new HashMapValues[K, V](self)
+       redef var keys: RemovableCollection[K] = new HashMapKeys[K, V](self) is lazy
+       redef var values: RemovableCollection[V] = new HashMapValues[K, V](self) is lazy
        redef fun has_key(k) do return node_at(k) != null
 end