Skip to content

Commit dd3cac5

Browse files
committed
Fix generation of TypeError
1 parent 22089f4 commit dd3cac5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interpret.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function check_isdefined(frame, @nospecialize(node))
417417
error("unrecognized isdefined node ", node)
418418
end
419419

420-
# For "profiling" where JuliaIntepreter spends its time. See the commented-out block
420+
# For "profiling" where JuliaInterpreter spends its time. See the commented-out block
421421
# in `step_expr!`
422422
const _location = Dict{Tuple{Method,Int},Int}()
423423

@@ -449,7 +449,7 @@ function step_expr!(@nospecialize(recurse), frame, @nospecialize(node), istoplev
449449
elseif node.head === :gotoifnot
450450
arg = @lookup(frame, node.args[1])
451451
if !isa(arg, Bool)
452-
throw(TypeError(nameof(frame), "if", Bool, node.args[1]))
452+
throw(TypeError(nameof(frame), "if", Bool, arg))
453453
end
454454
if !arg
455455
return (frame.pc = node.args[2]::Int)

0 commit comments

Comments
 (0)