File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ function linetable(arg)
269
269
end
270
270
return (arg:: CodeInfo ). linetable:: Vector{Any}
271
271
end
272
- linetable (arg, i:: Integer ) = linetable (arg)[i]:: LineTypes
272
+ linetable (arg, i:: Integer ) = linetable (arg)[i]:: Union{Expr, LineTypes}
273
273
274
274
function codelocs (arg)
275
275
if isa (arg, Frame)
Original file line number Diff line number Diff line change 142
142
# This time, step into the generated function itself
143
143
frame = enter_call_expr (:($ (callgenerated)()))
144
144
f, pc = debug_command (frame, :sg )
145
+ # Aside: generators can have `Expr(:line, ...)` in their line tables, test that this is OK
146
+ @test isexpr (JuliaInterpreter. linetable (f, 2 ), :line )
145
147
@test isa (pc, BreakpointRef)
146
148
@test JuliaInterpreter. scopeof (f). name == :generatedfoo
147
149
stmt = JuliaInterpreter. pc_expr (f)
You can’t perform that action at this time.
0 commit comments