Skip to content

Commit

Permalink
remove unbound type parameters (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko authored Sep 9, 2022
1 parent 07dfe60 commit 4f4d5f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRulesCore"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.15.4"
version = "1.15.5"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand Down
8 changes: 4 additions & 4 deletions src/tangent_types/tangent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end
function Base.:(==)(a::Tangent{P,T}, b::Tangent{P,T}) where {P,T}
return backing(a) == backing(b)
end
function Base.:(==)(a::Tangent{P}, b::Tangent{P}) where {P,T}
function Base.:(==)(a::Tangent{P}, b::Tangent{P}) where {P}
all_fields = union(keys(backing(a)), keys(backing(b)))
return all(getproperty(a, f) == getproperty(b, f) for f in all_fields)
end
Expand Down Expand Up @@ -117,7 +117,7 @@ function Base.getindex(tangent::Tangent{P,T}, idx::Symbol) where {P,T<:NamedTupl
hasfield(T, idx) || return ZeroTangent()
return unthunk(getfield(backing(tangent), idx))
end
function Base.getindex(tangent::Tangent, idx) where {P,T<:AbstractDict}
function Base.getindex(tangent::Tangent, idx)
return unthunk(getindex(backing(tangent), idx))
end

Expand Down Expand Up @@ -237,8 +237,8 @@ canonicalize(tangent::Tangent{<:Any,<:AbstractDict}) = tangent
# Tangents of unspecified primal types (indicated by specifying exactly `Any`)
# all combinations of type-params are specified here to avoid ambiguities
canonicalize(tangent::Tangent{Any,<:NamedTuple{L}}) where {L} = tangent
canonicalize(tangent::Tangent{Any,<:Tuple}) where {L} = tangent
canonicalize(tangent::Tangent{Any,<:AbstractDict}) where {L} = tangent
canonicalize(tangent::Tangent{Any,<:Tuple}) = tangent
canonicalize(tangent::Tangent{Any,<:AbstractDict}) = tangent

"""
_zeroed_backing(P)
Expand Down

2 comments on commit 4f4d5f0

@mzgubic
Copy link
Member

@mzgubic mzgubic commented on 4f4d5f0 Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/67976

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.15.5 -m "<description of version>" 4f4d5f0d560b2d3a41b2822285f6a05efb55b157
git push origin v1.15.5

Please sign in to comment.