Skip to content

Commit 221c833

Browse files
committed
minor followup to #57009, improve typing of GlobalAccessInfo
`bpart`s there are all known to be `Core.BindingPartition` and never be `nothing`.
1 parent eff8ba4 commit 221c833

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Compiler/src/abstractinterpretation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,8 @@ function abstract_eval_setglobal!(interp::AbstractInterpreter, sv::AbsIntState,
24762476
M, s = M.val, s.val
24772477
if M isa Module && s isa Symbol
24782478
(rt, exct), partition = global_assignment_rt_exct(interp, sv, saw_latestworld, GlobalRef(M, s), v)
2479-
return CallMeta(rt, exct, Effects(setglobal!_effects, nothrow=exct===Bottom), GlobalAccessInfo(partition))
2479+
return CallMeta(rt, exct, Effects(setglobal!_effects, nothrow=exct===Bottom),
2480+
partition === nothing ? NoCallInfo() : GlobalAccessInfo(partition))
24802481
end
24812482
return CallMeta(Union{}, TypeError, EFFECTS_THROWS, NoCallInfo())
24822483
end

Compiler/src/stmtinfo.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ perform such accesses.
491491
struct GlobalAccessInfo <: CallInfo
492492
bpart::Core.BindingPartition
493493
end
494-
GlobalAccessInfo(::Nothing) = NoCallInfo()
495494
add_edges_impl(edges::Vector{Any}, info::GlobalAccessInfo) =
496495
push!(edges, info.bpart)
497496

0 commit comments

Comments
 (0)