Skip to content

Commit 445bb04

Browse files
committed
Don't add SlotRefinement if type is not refined
1 parent 4f7c877 commit 445bb04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Compiler/src/abstractinterpretation.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,9 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
26782678
farg2 = ssa_def_slot(fargs[2], sv)
26792679
if farg2 isa SlotNumber
26802680
refined = form_partially_defined_struct(argtypes[2], argtypes[3])
2681-
refinements = SlotRefinement(farg2, refined)
2681+
if refined !== nothing
2682+
refinements = SlotRefinement(farg2, refined)
2683+
end
26822684
end
26832685
end
26842686
end

0 commit comments

Comments
 (0)