import tables, sequtils, algorithm
var t: Table[int, int]
# this works:
for k in t.keys.toSeq.sorted:
echo $k
# this does not?
for k in t.keys.toSeq.sorted():
echo $k
A very strange error in the second case:
Error: undeclared field: 'keys'
Is this some sort of iterator/macro bug or a feature?
I forgot I was going to say, the fix is something like:
for k in toSeq(t.keys).sorted():