Nim icon indicating copy to clipboard operation
Nim copied to clipboard

fixes #24720; std lib iterators unnecessarily require value copies

Open ringabout opened this issue 10 months ago • 0 comments

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])

ringabout avatar Feb 25 '25 12:02 ringabout