diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 4ef63f3cbaae1..11056f2131874 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1364,7 +1364,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState) frame.cur_hand = Pair{Any,Any}(l, frame.cur_hand) # propagate type info to exception handler old = s[l] - new = s[pc]::Array{Any,1} + new = s[pc]::VarTable newstate_catch = stupdate!(old, new) if newstate_catch !== false if l < frame.pc´´ diff --git a/base/compiler/inferencestate.jl b/base/compiler/inferencestate.jl index d1733d7d743ad..988f2eefa261e 100644 --- a/base/compiler/inferencestate.jl +++ b/base/compiler/inferencestate.jl @@ -16,7 +16,7 @@ mutable struct InferenceState world::UInt valid_worlds::WorldRange nargs::Int - stmt_types::Vector{Any} + stmt_types::Vector{Union{Nothing, Vector{Any}}} # ::Vector{Union{Nothing, VarTable}} stmt_edges::Vector{Union{Nothing, Vector{Any}}} stmt_info::Vector{Any} # return type @@ -67,7 +67,7 @@ mutable struct InferenceState n = length(code) s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ] - s_types = Any[ nothing for i = 1:n ] + s_types = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ] # initial types nslots = length(src.slotflags) diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 243c1ab410ccd..5082b01ea5036 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -568,7 +568,7 @@ function type_annotate!(sv::InferenceState) src = sv.src states = sv.stmt_types nargs = sv.nargs - nslots = length(states[1]::Array{Any,1}) + nslots = length(states[1]::VarTable) undefs = fill(false, nslots) body = src.code::Array{Any,1} nexpr = length(body)