diff --git a/src/tangent_types/tangent.jl b/src/tangent_types/tangent.jl index d13e75c76..150072bcd 100644 --- a/src/tangent_types/tangent.jl +++ b/src/tangent_types/tangent.jl @@ -107,7 +107,6 @@ Base.tail(t::Tangent{<:Tuple{}}) = NoTangent() Base.tail(t::Tangent{P}) where {P<:NamedTuple} = Tangent{_tailtype(P)}(; Base.tail(backing(canonicalize(t)))...) _tailtype(::Type{NamedTuple{S,P}}) where {S,P} = NamedTuple{Base.tail(S), _tailtype(P)} Base.tail(t::Tangent{<:NamedTuple{<:Any, <:Tuple{Any}}}) = NoTangent() -Base.tail(t::Tangent{<:NamedTuple{<:Any, <:Tuple{}}}) = NoTangent() function Base.getindex(tangent::Tangent{P,T}, idx::Int) where {P,T<:Union{Tuple,NamedTuple}} back = backing(canonicalize(tangent))