mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
Fixes
This commit is contained in:
parent
42380dbe87
commit
e821109343
@ -1413,6 +1413,20 @@ class AssignmentAnalyzer
|
|||||||
|
|
||||||
$new_assign_type = $new_assign_type->setPossiblyUndefined(false);
|
$new_assign_type = $new_assign_type->setPossiblyUndefined(false);
|
||||||
}
|
}
|
||||||
|
} elseif (!$assign_var_item->key instanceof PhpParser\Node\Scalar\String_
|
||||||
|
&& $assign_value_atomic_type->is_list
|
||||||
|
&& $assign_value_atomic_type->fallback_params
|
||||||
|
) {
|
||||||
|
IssueBuffer::maybeAdd(
|
||||||
|
new PossiblyUndefinedArrayOffset(
|
||||||
|
'Possibly undefined array key',
|
||||||
|
new CodeLocation($statements_analyzer->getSource(), $var)
|
||||||
|
),
|
||||||
|
$statements_analyzer->getSuppressedIssues()
|
||||||
|
);
|
||||||
|
|
||||||
|
$new_assign_type =
|
||||||
|
$assign_value_atomic_type->fallback_params[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($statements_analyzer->data_flow_graph && $assign_value && $new_assign_type) {
|
if ($statements_analyzer->data_flow_graph && $assign_value && $new_assign_type) {
|
||||||
|
@ -554,7 +554,7 @@ class TKeyedArray extends Atomic
|
|||||||
|
|
||||||
protected function getChildNodeKeys(): array
|
protected function getChildNodeKeys(): array
|
||||||
{
|
{
|
||||||
return ['properties'];
|
return ['properties', 'fallback_params'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function equals(Atomic $other_type, bool $ensure_source_equality): bool
|
public function equals(Atomic $other_type, bool $ensure_source_equality): bool
|
||||||
|
Loading…
Reference in New Issue
Block a user