Skip to content

Commit

Permalink
Merge pull request #658 from JuliaDiff/an/unionall
Browse files Browse the repository at this point in the history
Don't use UnionAlls in Varargs
  • Loading branch information
andreasnoack authored Aug 9, 2022
2 parents 5818173 + ea21c94 commit 148fa88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "1.43.0"
version = "1.43.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 2 additions & 2 deletions src/rulesets/Base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ _i_zero(ẋ::AbstractZero, x) = zero(x)
# may give a MethodError for `zero` but won't be wrong.

# Fast paths. Should it also collapse all-Zero cases?
_instantiate_zeros(ẋs::Tuple{Vararg{<:Number}}, xs) = ẋs
_instantiate_zeros(ẋs::Tuple{Vararg{<:AbstractArray}}, xs) = ẋs
_instantiate_zeros(ẋs::Tuple{Vararg{Number}}, xs) = ẋs
_instantiate_zeros(ẋs::Tuple{Vararg{AbstractArray}}, xs) = ẋs
_instantiate_zeros(ẋs::AbstractArray{<:Number}, xs) = ẋs
_instantiate_zeros(ẋs::AbstractArray{<:AbstractArray}, xs) = ẋs

Expand Down
2 changes: 1 addition & 1 deletion src/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function frule((_, ẋ), ::typeof(getindex), x::Tuple, i)
end

"for a given typle type, returns a Val{N} where N is the length of the tuple"
_tuple_N(::Type{<:Tuple{Vararg{<:Any, N}}}) where {N} = Val(N)
_tuple_N(::Type{<:Tuple{Vararg{Any, N}}}) where {N} = Val(N)

function rrule(::typeof(getindex), x::T, i::Integer) where {T<:Tuple}
function getindex_back_1(dy)
Expand Down

2 comments on commit 148fa88

@andreasnoack
Copy link
Member Author

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/65928

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.43.1 -m "<description of version>" 148fa8875725a19cf658405609fa1a56671d0cbd
git push origin v1.43.1

Please sign in to comment.