Skip to content

Commit e8aacbf

Browse files
authored
inference: don't allow SSAValues in assignment lhs (#56314)
In `InferenceState` the lhs of a `:=` expression should only contain `GlobalRef` or `SlotNumber` and no other IR elements. Currently when `SSAValue` appears in `lhs`, the invalid assignment effect is somehow ignored, but this is incorrect anyway, so this commit removes that check. Since `SSAValue` should not appear in `lhs` in the first place, this is not a significant change though.
1 parent 29b509d commit e8aacbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3648,7 +3648,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState, nextr
36483648
changes = StateUpdate(lhs, VarState(rt, false))
36493649
elseif isa(lhs, GlobalRef)
36503650
handle_global_assignment!(interp, frame, lhs, rt)
3651-
elseif !isa(lhs, SSAValue)
3651+
else
36523652
merge_effects!(interp, frame, EFFECTS_UNKNOWN)
36533653
end
36543654
end

0 commit comments

Comments
 (0)