haxetink / tink_streams

Streams from the future. With lasers, of course ... whoaaaaa!!!!
The Unlicense
12 stars 9 forks source link

Stack overflow on large iterator #17

Closed kevinresol closed 6 years ago

kevinresol commented 6 years ago

This following code crashes with a stack overflow on nodejs...

  function testLargeIterator() {
    var c = 1400;
    var s = Stream.ofIterator(0...c);
    var i = 0;
    s.forEach(function (v) {
      i++;
      return Resume;
    }).handle(function (x) {
      assertEquals(Depleted, x);
      assertEquals(c, i);
    });
  }
back2dos commented 6 years ago

Fixed by tink_core 1.15.2 ;)