Skip to content

Commit

Permalink
Update src/reflection/reflection.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Berg <naydex.mc+github@gmail.com>
  • Loading branch information
maartenvd and Pangoraw authored Jul 12, 2024
1 parent e5e9e57 commit d230579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reflection/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function invoke_tweaks!(ci::CodeInfo)
prewalk(x) do x
if x isa SlotNumber
SlotNumber(x.id == 1 ? 2 : x.id+2)
elseif x isa Core.ReturnNode && x.val isa SlotNumber
elseif x isa Core.ReturnNode && isdefined(x, :val) && x.val isa SlotNumber
Core.ReturnNode(SlotNumber(x.val.id == 1 ? 2 : x.val.id+2))
else
x
Expand Down

0 comments on commit d230579

Please sign in to comment.