mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +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) {
|
if ($redefined_vars !== null) {
|
||||||
foreach ($redefined_vars as $var_id => $type) {
|
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])) {
|
||||||
if (!isset($case_context->switch_scope->break_vars[$var_id])) {
|
|
||||||
unset($redefined_vars[$var_id]);
|
|
||||||
} else {
|
|
||||||
$redefined_vars[$var_id] = Type::combineUnionTypes(
|
$redefined_vars[$var_id] = Type::combineUnionTypes(
|
||||||
$case_context->switch_scope->break_vars[$var_id],
|
$case_context->switch_scope->break_vars[$var_id],
|
||||||
$type
|
$type
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
|
unset($redefined_vars[$var_id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1454,7 +1454,7 @@ class Reconciler
|
|||||||
$did_remove_type = false;
|
$did_remove_type = false;
|
||||||
|
|
||||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
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);
|
$existing_var_type->removeType($atomic_key);
|
||||||
$did_remove_type = true;
|
$did_remove_type = true;
|
||||||
} else {
|
} else {
|
||||||
@ -1497,7 +1497,7 @@ class Reconciler
|
|||||||
$did_remove_type = false;
|
$did_remove_type = false;
|
||||||
|
|
||||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
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);
|
$existing_var_type->removeType($atomic_key);
|
||||||
$did_remove_type = true;
|
$did_remove_type = true;
|
||||||
} else {
|
} else {
|
||||||
@ -1542,7 +1542,7 @@ class Reconciler
|
|||||||
$did_remove_type = false;
|
$did_remove_type = false;
|
||||||
|
|
||||||
foreach ($existing_var_atomic_types as $atomic_key => $_) {
|
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);
|
$existing_var_type->removeType($atomic_key);
|
||||||
$did_remove_type = true;
|
$did_remove_type = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user