mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Fix issues with build
This commit is contained in:
parent
fe25530cad
commit
a3dde47374
@ -556,14 +556,12 @@ class SwitchChecker
|
||||
if ($redefined_vars !== null) {
|
||||
foreach ($redefined_vars as $var_id => $type) {
|
||||
if (isset($case_context->switch_scope->break_vars[$var_id])) {
|
||||
if (!isset($case_context->switch_scope->break_vars[$var_id])) {
|
||||
unset($redefined_vars[$var_id]);
|
||||
} else {
|
||||
$redefined_vars[$var_id] = Type::combineUnionTypes(
|
||||
$case_context->switch_scope->break_vars[$var_id],
|
||||
$type
|
||||
);
|
||||
}
|
||||
$redefined_vars[$var_id] = Type::combineUnionTypes(
|
||||
$case_context->switch_scope->break_vars[$var_id],
|
||||
$type
|
||||
);
|
||||
} else {
|
||||
unset($redefined_vars[$var_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1454,7 +1454,7 @@ class Reconciler
|
||||
$did_remove_type = false;
|
||||
|
||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
||||
if ($key !== $new_var_type) {
|
||||
if ($atomic_key !== $new_var_type) {
|
||||
$existing_var_type->removeType($atomic_key);
|
||||
$did_remove_type = true;
|
||||
} else {
|
||||
@ -1497,7 +1497,7 @@ class Reconciler
|
||||
$did_remove_type = false;
|
||||
|
||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
||||
if ($key !== $new_var_type) {
|
||||
if ($atomic_key !== $new_var_type) {
|
||||
$existing_var_type->removeType($atomic_key);
|
||||
$did_remove_type = true;
|
||||
} else {
|
||||
@ -1542,7 +1542,7 @@ class Reconciler
|
||||
$did_remove_type = false;
|
||||
|
||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
||||
if ($key !== $new_var_type) {
|
||||
if ($atomic_key !== $new_var_type) {
|
||||
$existing_var_type->removeType($atomic_key);
|
||||
$did_remove_type = true;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user