Skip to content

Commit

Permalink
FWD rules work again
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Oct 10, 2022
1 parent b2bdf2a commit 559cd46
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/EnzymeCore/src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ function reverse end

_annotate(T::DataType) = TypeVar(gensym(), Annotation{T})
_annotate(::Type{T}) where T = TypeVar(gensym(), Annotation{T})
_annotate(VA::Core.TypeofVararg) = Core.TypeofVararg(_annotate(VA.T), VA.N)
function _annotate(VA::Core.TypeofVararg)
T = _annotate(VA.T)
if isdefined(VA, :N)
return Vararg{T, VA.N}
else
return Vararg{T}
end
end

function has_frule_from_sig(@nospecialize(TT); world=Base.get_world_counter())
TT = Base.unwrap_unionall(TT)
Expand Down

0 comments on commit 559cd46

Please sign in to comment.