Skip to content

Commit 96a0af0

Browse files
authored
iterate for parindex as well (#178)
1 parent d3942c0 commit 96a0af0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ end
115115

116116
@inline Base.getproperty(n::ParSource, s::Symbol) = ParIndexed(n, s)
117117
@inline Base.getindex(n::ParSource, i) = ParIndexed(n, i)
118-
@inline Base.indexed_iterate(n::ParSource, idx, start = 1) = (ParIndexed(n, idx), idx + 1)
118+
@inline Base.indexed_iterate(n::P, idx, start = 1) where P <: Union{ParSource, ParIndexed} = (ParIndexed(n, idx), idx + 1)
119119

120120

121121
@inline Base.getindex(n::VarSource, i) = Var(i)

0 commit comments

Comments
 (0)