Skip to content
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

test fixes for #24184 #24195

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

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Sep 28, 2024

refs #24184, refs (fixes) #23010, #22793

Something similar to the semArrayConstr changes was rejected before, but I think that version just early returned and didn't sem any elements if n.typ wasn't nil. In this version the elements are still resemmed, a new type just isn't constructed.

I'm going to split this into multiple PRs where the redo of #24184 will depend on the others, but not sure if I should split into 2 or 3 PRs since the fix for #22793 is a single line. Edit: No longer the case but I have no idea what depends on what now.

There is also a fix I couldn't get to work (for #7611, #12559, #16969, #17423 but not #23343 (explicit generics for procs)) that isn't necessary for #24184 but I wanted to see if they all worked in tandem.

metagn added a commit to metagn/Nim that referenced this pull request Oct 3, 2024
Araq pushed a commit that referenced this pull request Oct 3, 2024
fixes #23010, split from #24195

When resemming bracket nodes, the compiler currently unconditionally
makes a new node with an array type based on the node. However the VM
can generate bracket nodes with `seq` types, which this erases. To fix
this, if a bracket node already has a type, we still resem the bracket
node, but don't construct a new type for it, instead using the type of
the original node.

A version of this was rejected that didn't resem the node at all if it
was typed, but I can't find it. The difference with this one is that the
individual elements are still resemmed.

This should fix the break caused by #24184 so we could redo it after
this PR but it might still have issues, not to mention the related
pre-existing issues like #22793, #12559 etc.
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.

1 participant