Skip to content

Commit bb2e065

Browse files
yuyichaoKeno
authored andcommitted
Fix Dict key check in type inference
This has been there since #27126 (9100329) Dudging by the use of `reverse_mapping[stmt_val]` below this should either be a branch condition or an assert.
1 parent ad7e59a commit bb2e065

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

base/compiler/ssair/passes.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,7 @@ function perform_lifting!(compact::IncrementalCompact,
517517

518518
if stmt_val in keys(lifted_leaves)
519519
stmt_val = lifted_leaves[stmt_val]
520-
else
521-
isa(stmt_val, Union{SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping)
520+
elseif isa(stmt_val, Union{NewSSAValue, SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping)
522521
stmt_val = RefValue{Any}(lifted_phis[reverse_mapping[stmt_val]].ssa)
523522
end
524523

0 commit comments

Comments
 (0)