Skip to content

Commit 34fe7c1

Browse files
Fix types
1 parent 47c789f commit 34fe7c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function Base.getindex(ts::Traces, ::Val{s}) where {s}
190190
if t isa AbstractTrace
191191
t
192192
elseif t isa MultiplexTraces
193-
t[s]
193+
_getindex(t, Val(s))
194194
else
195195
throw(ArgumentError("unknown trace name: $s"))
196196
end
@@ -215,7 +215,7 @@ end
215215
@generated function Base.getindex(t::Traces{names}, i) where {names}
216216
ex = :(NamedTuple{$(names)}($(Expr(:tuple))))
217217
for k in names
218-
push!(ex.args[2].args, :(t[$(QuoteNode(k))][i]))
218+
push!(ex.args[2].args, :(t[Val($(QuoteNode(k)))][i]))
219219
end
220220
return ex
221221
end

0 commit comments

Comments
 (0)