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

foreach with duplicate tuple objects causes infinite loop #153

Open
awmorgan opened this issue Dec 1, 2024 · 1 comment
Open

foreach with duplicate tuple objects causes infinite loop #153

awmorgan opened this issue Dec 1, 2024 · 1 comment

Comments

@awmorgan
Copy link
Contributor

awmorgan commented Dec 1, 2024

This code will cause an infinite loop and the program will print item 1 over and over and never print item 2.

  var i = $I(1);
  var t1 = tuple(i, i, $I(2));
  foreach (item in t1) {
    println("item: %$", item);
  }
awmorgan added a commit to awmorgan/Cello that referenced this issue Dec 1, 2024
awmorgan added a commit to awmorgan/Cello that referenced this issue Dec 1, 2024
@orangeduck
Copy link
Owner

Oof, yeah that is nasty. Thanks for looking into fixing this.

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 a pull request may close this issue.

2 participants