Skip to content

Commit fb11a9c

Browse files
committed
type of type erasure in ∂☆new
1 parent 7be0a92 commit fb11a9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stage1/recurse_fwd.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function (::∂☆new{1})(B::Type, xs::AbstractTangentBundle{1}...)
2424
tangent_nt = NamedTuple{names}(tangent_tup)
2525
Tangent{B, typeof(tangent_nt)}(tangent_nt)
2626
end
27-
return TaylorBundle{1, B}(the_primal, (the_partial,))
27+
B2 = typeof(the_primal) # HACK: if the_primal actually has types in it then we want to make sure we get DataType not Type(...)
28+
return TaylorBundle{1, B2}(the_primal, (the_partial,))
2829
end
2930

3031
function (::∂☆new{N})(B::Type, xs::AbstractTangentBundle{N}...) where {N}

0 commit comments

Comments
 (0)