Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/torfjelde/fix-511' into torfjeld…
Browse files Browse the repository at this point in the history
…e/fix-511
  • Loading branch information
torfjelde committed Aug 4, 2023
2 parents c99d9ae + ae9b797 commit 11acfd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ end
add_return_to_last_statment!(body) = Expr(:return, body)

Check warning on line 564 in src/compiler.jl

View check run for this annotation

Codecov / codecov/patch

src/compiler.jl#L564

Added line #L564 was not covered by tests
function add_return_to_last_statment!(body::Expr)
# If the last statement is a return-statement, we don't do anything.
# Otherwise we replace the last statement with an altered `return`.
# Otherwise we replace the last statement with a `return` statement.
if !Meta.isexpr(body.args[end], :return)
body.args[end] = Expr(:return, body.args[end])
end
Expand Down

0 comments on commit 11acfd4

Please sign in to comment.