Skip to content

Commit 84a4364

Browse files
committed
Fix a double-evaluation of an anonymous function
1 parent a8736d8 commit 84a4364

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/signatures.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ function methoddef!(@nospecialize(recurse), signatures, frame::Frame, @nospecial
449449
sigt, pc = signature(recurse, frame, stmt, pc)
450450
meth = whichtt(sigt)
451451
if (meth === nothing || !(meth.sig <: sigt && sigt <: meth.sig)) && define
452-
step_expr!(recurse, frame, stmt, true)
452+
pc = step_expr!(recurse, frame, stmt, true)
453453
meth = whichtt(sigt)
454454
end
455455
if isa(meth, Method)
@@ -471,7 +471,7 @@ function methoddef!(@nospecialize(recurse), signatures, frame::Frame, @nospecial
471471
end
472472
end
473473
frame.pc = pc
474-
return ( define ? step_expr!(recurse, frame, stmt, true) : next_or_nothing!(frame) ), pc3
474+
return ( define ? pc : next_or_nothing!(frame) ), pc3
475475
end
476476
ismethod1(stmt) || error("expected method opening, got ", stmt)
477477
name = stmt.args[1]

0 commit comments

Comments
 (0)