1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Rollback some changes

This commit is contained in:
robchett 2023-10-17 21:47:12 +01:00
parent 889bdca461
commit 0f8a3204f3
2 changed files with 5 additions and 0 deletions

View File

@ -2650,6 +2650,10 @@ class SimpleAssertionReconciler extends Reconciler
) {
$callable_types[] = $type;
$redundant = false;
} elseif ($type instanceof TArray) {
$type = new TCallableKeyedArray($type->type_params);
$callable_types[] = $type;
$redundant = false;
} elseif ($type instanceof TKeyedArray && count($type->properties) === 2) {
$type = new TCallableKeyedArray($type->properties);
$callable_types[] = $type;

View File

@ -1411,6 +1411,7 @@ class TypeParser
!is_numeric($property_key)
|| ($had_optional && !$property_maybe_undefined)
|| $type === 'array'
|| $type === 'callable-array'
|| $previous_property_key != ($property_key - 1)
)
) {