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

Fix foreach ending on tables with type mismatch #2804

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Oct 22, 2023

Fixes #2803

This repeats the iter in a loop until a type match or nil.

This might be better as a fix in the rcompiler to run typecheck in the loop, so as to preserve the intent of iter. Unfortunately, despite my attempts, I can't find a way to safely put the responsibility on the compiler instead.

If I had the approval to change the signature of operator iter to include type at the end, it would be terribly easy to move into the compiler instead, however passing type is also a bit heavyhanded of an approach.

@thegrb93
Copy link
Contributor

@Vurv78 this good to merge?

@thegrb93 thegrb93 merged commit e4d7aaf into wiremod:master Oct 30, 2023
1 check failed
@Denneisk Denneisk deleted the tableiter branch November 16, 2023 22:29
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.

E2: Foreach behavior change with compiler rewrite
2 participants