1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-29 20:28:59 +01:00

Fix issues with build

This commit is contained in:
Matthew Brown 2018-11-10 20:56:52 -05:00
parent fe25530cad
commit a3dde47374
2 changed files with 9 additions and 11 deletions

View File

@ -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
);
}
} else {
unset($redefined_vars[$var_id]);
}
}
}

View File

@ -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 {