Skip to content

Commit 426dd8e

Browse files
authored
fixes problematic abstract eval passes: (#36948)
- `abstract_eval_value_expr` will no longer return `nothing` - fix problematic `isdefined` check within `abstract_eval_statement`
1 parent c1656e9 commit 426dd8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ function abstract_eval_value_expr(interp::AbstractInterpreter, e::Expr, vtypes::
10711071
if 1 <= n <= length(sv.sptypes)
10721072
t = sv.sptypes[n]
10731073
end
1074+
return t
10741075
elseif e.head === :boundscheck
10751076
return Bool
10761077
else
@@ -1202,7 +1203,7 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e),
12021203
t = Const(true) # definitely assigned previously
12031204
end
12041205
elseif isa(sym, Symbol)
1205-
if isdefined(sv.mod, sym.name)
1206+
if isdefined(sv.mod, sym)
12061207
t = Const(true)
12071208
end
12081209
elseif isa(sym, GlobalRef)

0 commit comments

Comments
 (0)