JuliaDynamics / ResumableFunctions.jl

C# style generators a.k.a. semi-coroutines for Julia.
Other
160 stars 19 forks source link

let blocks without variable assignement like `let i; f(i); end` are not supported #70

Open Krastanov opened 1 year ago

Krastanov commented 1 year ago
julia> function g()
           let j
               j = 1
           end
       end
g (generic function with 1 method)

julia> @resumable function f()
           let j
               j = 1
           end
       end
ERROR: type Symbol has no field args
Krastanov commented 1 year ago

a few more unsupported let forms

julia> @resumable function f()
           let i=1, j=2
               i+j
           end
       end
ERROR: type Int64 has no field value
julia> @resumable function f()
           i=1
           j=2
           let i=i, j=j
               i+j
           end
       end
ERROR: type Expr has no field value