We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a658ea0 commit 5312b84Copy full SHA for 5312b84
src/utils.jl
@@ -251,10 +251,14 @@ Return the local variables as a vector of `Variable`[@ref].
251
function locals(frame::Frame)
252
vars = Variable[]
253
data, code = frame.framedata, frame.framecode
254
- for (sym, idx) in data.last_reference
+ added = Set{Symbol}()
255
+ for sym in code.src.slotnames
256
+ sym ∈ added && continue
257
+ idx = get(data.last_reference, sym, 0)
258
+ idx == 0 && continue
259
push!(vars, Variable(something(data.locals[idx]), sym, false))
260
+ push!(added, sym)
261
end
- reverse!(vars)
262
if code.scope isa Method
263
syms = sparam_syms(code.scope)
264
for i in 1:length(syms)
0 commit comments