Open hverr opened 6 years ago
Note: using the code below does not work, because the overdub mechanism with @generated functions apparently is not correctly recursively overdubbing
insert!(b.args, 2, :($(contextSpec.varName) = $Contextual.context() :: $(contextSpec.ctxType)))
# Output new function
f[:name] = :(::$TinyCassette.Overdub{typeof($(f[:name])), $(contextSpec.ctxType)})
esc(MacroTools.combinedef(f))
Currently the implementation uses a fixed variable name to reference to the
Overdub
struct when rewriting an outline@contextualized
functionSee: https://github.com/hverr/Contextual.jl/blob/21393e71cb5f23bae07902ba84d5923d2f5bd3e2/src/outline_contextual.jl#L23