1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
This commit is contained in:
orklah 2022-01-05 18:21:38 +01:00
parent c1575d29fd
commit e0fb87596d

View File

@ -1229,7 +1229,7 @@ class AssertionReconciler extends Reconciler
}
if ($existing_var_atomic_type instanceof TLiteralInt && $existing_var_atomic_type->value === $value) {
//if we're here, we check that we add at least another type in the union, otherwise it's redundant
//if we're here, we check that we had at least another type in the union, otherwise it's redundant
if ($existing_var_type->isSingleIntLiteral()) {
if ($var_id && $code_location) {
@ -1362,7 +1362,7 @@ class AssertionReconciler extends Reconciler
foreach ($existing_var_atomic_types as $existing_var_atomic_type) {
if ($existing_var_atomic_type instanceof TLiteralString && $existing_var_atomic_type->value === $value) {
//if we're here, we check that we add at least another type in the union, otherwise it's redundant
//if we're here, we check that we had at least another type in the union, otherwise it's redundant
if ($existing_var_type->isSingleStringLiteral()) {
if ($var_id && $code_location) {