Cello icon indicating copy to clipboard operation
Cello copied to clipboard

foreach with duplicate tuple objects causes infinite loop

Open awmorgan opened this issue 1 year ago • 1 comments

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 avatar Dec 01 '24 14:12 awmorgan

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

orangeduck avatar Dec 01 '24 15:12 orangeduck