Closed
Description
This does not compile and I think it should.
iterator pairs*[K, V](group: Group[K, V]): (K, V) =
for key, value in group.table.pairs:
yield (key: key, val: value)
iterator mpairs*[K, V](group: Group[K, V]): (K, var V) =
for key, value in group.table.mpairs:
yield (key: key, val: value) # compiler error
yield (key, value) # compiles
Nim Compiler Version 1.0.4 [Linux: amd64]
Compiled at 2019-12-16
Copyright (c) 2006-2019 by Andreas Rumpf
git hash: 97e0ce3c75c9348226ea1fcdfc601c6fbe5c0e75
active boot switches: -d:danger