1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Clone correct context

This commit is contained in:
Matthew Brown 2022-04-06 11:36:26 -04:00
parent d176361028
commit f3135949fe

View File

@ -129,7 +129,7 @@ class AndAnalyzer
$changed_var_ids = [];
$right_context = clone $left_context;
$right_context = clone $context;
if ($left_type_assertions) {
// while in an and, we allow scope to boil over to support
@ -137,7 +137,7 @@ class AndAnalyzer
$right_vars_in_scope = Reconciler::reconcileKeyedTypes(
$left_type_assertions,
$active_left_assertions,
$context->vars_in_scope,
$right_context->vars_in_scope,
$context->references_in_scope,
$changed_var_ids,
$left_referenced_var_ids,