@@ -29,15 +29,15 @@ struct ReturnInstruction{T} <: AbstractInstruction
2929 arg:: TypedVar{T}
3030end
3131
32- mutable struct TapedFunction{F, T }
32+ mutable struct TapedFunction{F}
3333 func:: F # maybe a function, a constructor, or a callable object
3434 arity:: Int
3535 ir:: Core.CodeInfo
3636 tape:: RawTape
3737 unified_tape:: Vector{FunctionWrapper{Nothing, Tuple{TapedFunction}}}
3838 counter:: Int
3939 bindings:: Dict{Symbol, Any}
40- retval:: TypedVar{T }
40+ retval:: TypedVar{<:Any }
4141
4242 function TapedFunction (f:: F , args... ; cache= false ) where {F}
4343 args_type = _accurate_typeof .(args)
@@ -55,16 +55,15 @@ mutable struct TapedFunction{F, T}
5555 utape = Vector {FunctionWrapper{Nothing, Tuple{TapedFunction}}} ()
5656 bindings = translate! (tape, ir)
5757
58- T = isa (ir. rettype, Core. Const) ? typeof (ir. rettype. val) : ir. rettype
59- tf = new {F, T} (f, length (args), ir, tape, utape, 1 ,
60- bindings, TypedVar {T} (:none ))
58+ tf = new {F} (f, length (args), ir, tape, utape, 1 ,
59+ bindings, TypedVar {Any} (:none ))
6160 TRCache[cache_key] = tf # set cache
6261 # unify!(tf)
6362 return tf
6463 end
6564
66- function TapedFunction (tf:: TapedFunction{F, T } ) where {F, T }
67- new {F, T } (tf. func, tf. arity, tf. ir, tf. tape, tf. unified_tape,
65+ function TapedFunction (tf:: TapedFunction{F} ) where {F}
66+ new {F} (tf. func, tf. arity, tf. ir, tf. tape, tf. unified_tape,
6867 tf. counter, tf. bindings, tf. retval)
6968 end
7069end
0 commit comments