You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import cps
type C = ref object of RootObj
fn*: proc(c: C): C {.nimcall.}
proc prim(s: string): C {.cpsMagic.} =
echo s
return c
proc f(): C {.cps.} =
var a: int = 0
while a < 3:
echo a
cps prim("two")
inc a
echo "bye"
var c = f()
while c != nil and c.fn != nil:
c = c.fn(c)
Will print "bye" forever
The text was updated successfully, but these errors were encountered:
Will print "bye" forever
The text was updated successfully, but these errors were encountered: