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
julia>using Cassette:@context, @prehook, @overdub
julia>@context Ctx
# This isn't prehook needed to reproduce, just gives us a little info about what's going on
julia>@prehook (f::Any)(args...) where {__CONTEXT__<:Ctx} =println(f, args)
julia>bar(T) =isa(T, UnionAll) ?bar(T.body) : T
bar (generic function with 1 method)
julia>@overdub(Ctx(), bar(Vector{T} where T))
TypeVar(:T,)
Core.apply_type(Union,)
Core.apply_type(Array{T,1} where T, T)
UnionAll(T, Array{T,1})
bar(Array{T,1} where T,)
isa(Array{T,1} where T, UnionAll)
Base.getproperty(Array{T,1} where T, :body)
getfield(Array{T,1} where T, :body)
bar(Array{T,1},)
isa(Array{T,1}, UnionAll)
Array{T,1}
julia>bar(Vector{T} where T)
Array{T,1}
julia>@overdub(Ctx(), bar(Vector{Vector{T}} where T))
TypeVar(:T,)
Core.apply_type(Union,)
Core.apply_type(Array{T,1} where T, T)
Core.apply_type(Array{T,1} where T, Array{T,1})
UnionAll(T, Array{Array{T,1},1})
bar(Array{Array{T,1},1} where T,)
isa(Array{Array{T,1},1} where T, UnionAll)
Base.getproperty(Array{Array{T,1},1} where T, :body)
getfield(Array{Array{T,1},1} where T, :body)
bar(Array{Array{T,1},1},)
isa(Array{Array{T,1},1}, UnionAll)
Base.getproperty(Array{Array{T,1},1}, :body)
getfield(Array{Array{T,1},1}, :body)
ERROR: type DataType has no field body
Stacktrace:
[1] overdub_execute at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:9 [inlined]
[2] overdub_recurse at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:155 [inlined]
[3] overdub_execute at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:34 [inlined]
[4] overdub_recurse(::Ctx{Cassette.Unused,0x0000000000006ba7,Cassette.Unused,getfield(Main, Symbol("##CtxTag#1559")){Nothing,0x5e60b7525025d2c1}}, ::typeof(bar), ::Type{Array{Array{T,1},1} where T}) at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:155
[5] overdub_execute at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:34 [inlined]
[6] overdub_recurse(::Ctx{Cassette.Unused,0x0000000000006ba7,Cassette.Unused,getfield(Main, Symbol("##CtxTag#1559")){Nothing,0x5e60b7525025d2c1}}, ::typeof(bar), ::Type{Array{Array{T,1},1} where T}) at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:155
[7] overdub_execute at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:34 [inlined]
[8] overdub_recurse(::Ctx{Cassette.Unused,0x0000000000006ba7,Cassette.Unused,getfield(Main, Symbol("##CtxTag#1559")){Nothing,0x5e60b7525025d2c1}}, ::getfield(Main, Symbol("##16#17")), ::Ctx{Cassette.Unused,0x0000000000006ba7,Cassette.Unused,getfield(Main, Symbol("##CtxTag#1559")){Nothing,0x5e60b7525025d2c1}}) at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:155
[9] top-level scope at /Users/jarrettrevels/.julia/v0.7/Cassette/src/macros.jl:68
julia>bar(Vector{Vector{T}} where T)
Array{Array{T,1},1}
The text was updated successfully, but these errors were encountered:
Found in #41:
The text was updated successfully, but these errors were encountered: