Skip to content

Commit

Permalink
Maintain possibly undefined vars when analyzing if context.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrolGenhald committed Feb 20, 2022
1 parent 21de80a commit 9a3b46b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ function (Clause $c) use ($mixed_var_ids, $cond_object_id): Clause {

if ($if_scope->redefined_vars) {
foreach ($if_scope->redefined_vars as $var_id => $type) {
$type->possibly_undefined = $type->possibly_undefined
|| ($context->vars_in_scope[$var_id]->possibly_undefined ?? true);
$context->vars_in_scope[$var_id] = $type;
$if_scope->updated_vars[$var_id] = true;

Expand Down

0 comments on commit 9a3b46b

Please sign in to comment.