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
julia> Cassette.@context Ctx
julia> ctx =Ctx()
Ctx{Cassette.Unused,Cassette.Unused,Nothing}(Cassette.Unused(), Cassette.Unused(), nothing)
julia> Cassette.overdub_recurse(ctx, sin, 1)
0.8414709848078965# Doing the following instead makes this work instead of break:## Cassette.prehook(::Ctx, f::Any, args...) = println("1")#
julia> Cassette.prehook(::C, f::Any, args...) where {C<:Ctx} =println("1")
julia> Cassette.overdub_recurse(ctx, sin, 1)
0.8414709848078965
julia>methods(Cassette.prehook)
# 2 methods for generic function "prehook":
[1] prehook(::C, f, args...) where C<:Ctxin Main at REPL[6]:1
[2] prehook(::Cassette.AbstractContext, ...) in Cassette at /Users/jarrettrevels/.julia/v0.7/Cassette/src/overdub.jl:5
julia>@which Cassette.prehook(ctx, sin, 1)
prehook(::C, f, args...) where C<:Ctxin Main at REPL[6]:1# reflection gives us the right method, but it's still not getting called
julia> Cassette.prehook(ctx, sin, 1)
The text was updated successfully, but these errors were encountered:
Originally thought this was a straight up world age issue a la #6, but getting rid of the type parameter in the
prehook
definition "fixes" it...@JeffBezanson
@vtjnash
The text was updated successfully, but these errors were encountered: