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 testes
import cps
type
C =refobjectofRootObj
fn*: proc(c: C): C {.nimcall.}
proctrampoline(c: C) =var c = c
while c !=niland c.fn !=nil:
c = c.fn(c)
testes:
block:
procloop() {.cps: C.} =for i in0..3:
discardtrampolineloop()
Here's the broken rewrite; CPS doesn't know what to do with the var i statement. I don't even understand how it passes through sem successfully to reach our macro...
16procfoo() =17block :tmp:
18var i
19## An alias for `countup(a, b, 1)`.20## 21## See also:22## * [..<](#..<.i,T,T)23var res =024block :tmp:
25while res <=3:
26 i =T(res)
27discard28inc(res, 1)
The text was updated successfully, but these errors were encountered:
Here's the test that runs against the
almost
branch:https://github.com/disruptek/cps/blob/almost/tests/fors.nim
Here's the broken rewrite; CPS doesn't know what to do with the
var i
statement. I don't even understand how it passes through sem successfully to reach our macro...The text was updated successfully, but these errors were encountered: