JuliaDynamics / ResumableFunctions.jl

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

a resumable function as a struct field var causes an error "struct expression not at top level" #66

Closed mongibellili closed 1 year ago

mongibellili commented 1 year ago

Greetings, A resumable function , when put inside a function, causes the error "struct expression not at top level" . because "@resumable transforms the function block to a larger expression that includes a mutable struct block. struct blocks can only be defined in the global scope" . can putting a resumable function inside another function be allowed in the future?