Nim
Nim copied to clipboard
fixes #24720; std lib iterators unnecessarily require value copies
fixes #24720
It seems that Nim lacks something like derefs in Nimony. i.e. it cannot handle tuple types containing view types: e.g. (lent T, lent T). So I fix the types for forVars in sem phases to have the (T, T) type. And in transf for inline iterators, it derefs the internal field: i.e. let tmpAsgn = rhs; var lhs = (deref tmpAsgn[0], deref tmpAsgn[1])