Skip to content

Commit 3e01bcc

Browse files
committed
Don't use UnionAlls in Varargs
1 parent 5818173 commit 3e01bcc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rulesets/Base/array.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ _i_zero(ẋ::AbstractZero, x) = zero(x)
7676
# may give a MethodError for `zero` but won't be wrong.
7777

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

src/rulesets/Base/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function frule((_, ẋ), ::typeof(getindex), x::Tuple, i)
1212
end
1313

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

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

0 commit comments

Comments
 (0)