Skip to content

4656-tmp#4

Draft
kfcripps wants to merge 11 commits intomainfrom
4656-tmp
Draft

4656-tmp#4
kfcripps wants to merge 11 commits intomainfrom
4656-tmp

Conversation

@kfcripps
Copy link
Owner

No description provided.

// We only want to fold the label expressions after they are inspected by the typechecker,
// so don't visit the labels here.
for (auto* c : s->cases)
visit(c->statement);
Copy link

@fruffy fruffy May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try c->statement = c->statement->apply(*this) instead? or apply_visitor_preorder

I think this also will not work because the statement is const, you have to clone all cases in s->case and reassign s->cases after.

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.

2 participants