Skip to content

fixes #24720; std lib iterators unnecessarily require value copies #24723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Feb 25, 2025

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 ringabout marked this pull request as draft May 26, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std lib iterators unnecessarily require value copies
1 participant