Skip to content

Commit 4381fa6

Browse files
author
Kristoffer Carlsson
authored
avoid a Core.Box in _to_expr (#256)
1 parent 52a976e commit 4381fa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/expr.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ function _to_expr(node::SyntaxNode; iteration_spec=false, need_linenodes=true,
221221
# This case should only occur when there's an error inside the
222222
# parens, and we've passed ignore_errors=true to the parser.
223223
# Wrap in a block to preserve both the value and the error.
224-
@check all(Meta.isexpr(args[j], :error) for j in 2:length(args))
224+
let args = args
225+
@check all(Meta.isexpr(args[j], :error) for j in 2:length(args))
226+
end
225227
return Expr(:block, args...)
226228
end
227229
elseif headsym === :try

0 commit comments

Comments
 (0)