Skip to content

Commit 15df07f

Browse files
author
Patrick Häcker
committed
Only do type inference filtering when having an InferenceState
1 parent 171bd14 commit 15df07f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/abstractinterpret/typeinfer.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,11 @@ CC.push!(view::AbstractAnalyzerView, inf_result::InferenceResult) = CC.push!(get
317317
function CC.typeinf(analyzer::AbstractAnalyzer, frame::InferenceState)
318318
parent = CC.frame_parent(frame)
319319

320-
if is_constant_propagated(frame) && parent !== nothing
321-
parent::InferenceState
320+
# The parent of a constant-propagated frame is an `InferenceState` when const-prop' is
321+
# entered from regular abstract interpretation, but an `IRInterpretationState` when it is
322+
# entered from semi-concrete interpretation (IR interpretation). Only the former carries
323+
# the `InferenceState`-based report stash that the lineage filtering operates on.
324+
if is_constant_propagated(frame) && parent isa InferenceState
322325
# JET is going to perform the abstract-interpretation with the extended lattice elements:
323326
# throw-away the error reports that are collected during the previous non-constant abstract-interpretation
324327
# NOTE that the `linfo` here is the exactly same object as the method instance used

0 commit comments

Comments
 (0)