Skip to content

Commit

Permalink
Fix Dict key check in type inference
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yuyichao authored and Keno committed Dec 30, 2020
1 parent ad7e59a commit bb2e065
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,7 @@ function perform_lifting!(compact::IncrementalCompact,

if stmt_val in keys(lifted_leaves)
stmt_val = lifted_leaves[stmt_val]
else
isa(stmt_val, Union{SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping)
elseif isa(stmt_val, Union{NewSSAValue, SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping)
stmt_val = RefValue{Any}(lifted_phis[reverse_mapping[stmt_val]].ssa)
end

Expand Down

0 comments on commit bb2e065

Please sign in to comment.