Skip to content

Commit c14c7a0

Browse files
authored
Fix recursion to zero length tuple on eachop (#46)
1 parent 1fd2503 commit c14c7a0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Static"
22
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
33
authors = ["chriselrod", "ChrisRackauckas", "Tokazama"]
4-
version = "0.5.5"
4+
version = "0.5.6"
55

66
[deps]
77
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"

src/tuples.jl

+2-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ end
3434
3535
Produces a tuple of `(op(args..., iterator[1]), op(args..., iterator[2]),...)`.
3636
"""
37-
@inline function eachop(op::F, itr::Tuple{I1,I2,Vararg}, args::Vararg{Any,K}) where {F,I1,I2,K}
37+
@inline function eachop(op::F, itr::Tuple{T,Vararg{Any}}, args::Vararg{Any}) where {F,T}
3838
return (op(args..., first(itr)), eachop(op, Base.tail(itr), args...)...)
3939
end
40-
@inline function eachop(op::F, itr::Tuple{I}, args::Vararg{Any,K}) where {F,I,K}
41-
return (op(args..., first(itr)),)
42-
end
40+
eachop(::F, ::Tuple{}, args::Vararg{Any}) where {F} = ()
4341

4442
"""
4543
eachop_tuple(op, arg, args...; iterator::Tuple{Vararg{StaticInt}}) -> Type{Tuple}

0 commit comments

Comments
 (0)