New Issue: [Bug]: recursive iterator results in compiler crash

28697, "jabraham17", "[Bug]: recursive iterator results in compiler crash", "2026-04-16T19:01:17Z"

The following program results in an internal error

iter foo(x): int {
  yield 1;
  if x > 0 {
    foreach e in foo(x-1) {
      yield e;
    }
  }
}

proc main() {
  for i in foo(2) {
    i;
  }
}

I believe the internal error is a segfault caused by a formal of foo being NULL during AST pruning