diff --git a/Compiler/src/abstractinterpretation.jl b/Compiler/src/abstractinterpretation.jl index 100cdd97e511a..47e90e22c4d57 100644 --- a/Compiler/src/abstractinterpretation.jl +++ b/Compiler/src/abstractinterpretation.jl @@ -3255,7 +3255,7 @@ function abstract_eval_copyast(interp::AbstractInterpreter, e::Expr, sstate::Sta return RTEffects(rt, Any, effects) end -function abstract_eval_isdefined_expr(interp::AbstractInterpreter, e::Expr, sstate::StatementState, +function abstract_eval_isdefined_expr(::AbstractInterpreter, e::Expr, sstate::StatementState, sv::AbsIntState) sym = e.args[1] if isa(sym, SlotNumber) && sstate.vtypes !== nothing diff --git a/Compiler/src/typelattice.jl b/Compiler/src/typelattice.jl index 2bf4954343b37..aae0241d69aa1 100644 --- a/Compiler/src/typelattice.jl +++ b/Compiler/src/typelattice.jl @@ -40,6 +40,9 @@ struct Conditional isdefined::Bool=false) assert_nested_slotwrapper(thentype) assert_nested_slotwrapper(elsetype) + if thentype isa LimitedAccuracy || elsetype isa LimitedAccuracy + return Bool + end return new(slot, thentype, elsetype, isdefined) end end @@ -83,6 +86,9 @@ struct MustAlias assert_nested_slotwrapper(fldtyp) # @assert !isalreadyconst(vartyp) "vartyp is already const" # @assert !isalreadyconst(fldtyp) "fldtyp is already const" + if vartyp isa LimitedAccuracy || fldtyp isa LimitedAccuracy + return fldtyp + end return new(slot, vartyp, fldidx, fldtyp) end end @@ -104,6 +110,9 @@ struct InterMustAlias assert_nested_slotwrapper(fldtyp) # @assert !isalreadyconst(vartyp) "vartyp is already const" # @assert !isalreadyconst(fldtyp) "fldtyp is already const" + if vartyp isa LimitedAccuracy || fldtyp isa LimitedAccuracy + return fldtyp + end return new(slot, vartyp, fldidx, fldtyp) end end