We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47c789f commit 34fe7c1Copy full SHA for 34fe7c1
1 file changed
src/traces.jl
@@ -190,7 +190,7 @@ function Base.getindex(ts::Traces, ::Val{s}) where {s}
190
if t isa AbstractTrace
191
t
192
elseif t isa MultiplexTraces
193
- t[s]
+ _getindex(t, Val(s))
194
else
195
throw(ArgumentError("unknown trace name: $s"))
196
end
@@ -215,7 +215,7 @@ end
215
@generated function Base.getindex(t::Traces{names}, i) where {names}
216
ex = :(NamedTuple{$(names)}($(Expr(:tuple))))
217
for k in names
218
- push!(ex.args[2].args, :(t[$(QuoteNode(k))][i]))
+ push!(ex.args[2].args, :(t[Val($(QuoteNode(k)))][i]))
219
220
return ex
221
0 commit comments