Skip to content

Commit e201a2e

Browse files
authored
Don't assume that method1 is always in a thunk (#891)
Fixes Revise test failures in JuliaLang/julia#57346.
1 parent d579849 commit e201a2e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/lowered.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ function methods_by_execution!(@nospecialize(recurse), methodinfo, docexprs, fra
356356
end
357357
end
358358
end
359-
pc = next_or_nothing!(frame)
359+
@assert length(stmt.args) == 1
360+
pc = mode !== :sigs ? step_expr!(recurse, frame, stmt, true) :
361+
next_or_nothing!(frame)
360362
else
361363
pc, pc3 = ret
362364
# Get the line number from the body

test/backedges.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ do_test("Backedges") && @testset "Backedges" begin
2020
laststmt = src.code[end]
2121
@assert isa(laststmt, Core.ReturnNode)
2222
to_skip = isa(laststmt.val, Revise.JuliaInterpreter.SSAValue) ? 2 : 1
23+
# Revise.LoweredCodeUtils.print_with_code(stdout, src, isrequired)
2324
@test sum(isrequired) == length(src.code)-count(e->isexpr(e, :latestworld), src.code)-to_skip # skips the `return` at the end (and its argument)
2425

2526
src = """

0 commit comments

Comments
 (0)