Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2705,6 +2705,8 @@ function abstract_eval_statement_expr(interp::AbstractInterpreter, e::Expr, vtyp
elseif ehead === :gc_preserve_end || ehead === :leave || ehead === :pop_exception ||
ehead === :global || ehead === :popaliasscope
return RTEffects(Nothing, Union{}, Effects(EFFECTS_TOTAL; effect_free=EFFECT_FREE_GLOBALLY))
elseif ehead === :globaldecl
return RTEffects(Nothing, Any, EFFECTS_UNKNOWN)
elseif ehead === :thunk
return RTEffects(Any, Any, EFFECTS_UNKNOWN)
end
Expand Down
1 change: 1 addition & 0 deletions base/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const VALID_EXPR_HEADS = IdDict{Symbol,UnitRange{Int}}(
:copyast => 1:1,
:meta => 0:typemax(Int),
:global => 1:1,
:globaldecl => 2:2,
:foreigncall => 5:typemax(Int), # name, RT, AT, nreq, (cconv, effects), args..., roots...
:cfunction => 5:5,
:isdefined => 1:2,
Expand Down
5 changes: 5 additions & 0 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2391,3 +2391,8 @@ let (c, r, res) = test_complete_context("const xxx = Base.si", Main)
@test res
@test "sin" ∈ c
end

let (c, r, res) = test_complete_context("global xxx::Number = Base.", Main)
@test res
@test "pi" ∈ c
end