I was trying out the new iterator feature, and managed to write a small test program that gives an error. I presume there is a problem with how the macro interacts with cl-labels.

Here's the test code:

(iter-defun bar ()
  (cl-labels ((foo ()
                (iter-yield 'a)
                (iter-yield 'b)
                (iter-yield 'c)
                (iter-yield 'd)))
    (foo)
    (foo)))

(let ((x (bar)))
  (loop repeat 8
        collect (iter-next x)))

When run, it gives the following error:

*** Eval error ***  Symbol’s function definition is void: cps-internal-yield

Regards,
Elias