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 committed Sep 5, 2020
1 parent b365157 commit 570dc1b
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 @@ -515,8 +515,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 570dc1b

Please sign in to comment.